### Question:
Dot { public static <ID> Dot<ID> dot(Graph<ID> graph) { return new Dot<>(graph); } private  Dot(Graph<ID> graph); static Dot<ID> dot(Graph<ID> graph); String getType(); void setType(String type); Dot type(String type); void write(Writer writer); String toString(); BufferedImage toImage(); void writeImage(OutputStream out, String format); void writeImage(String fileName, String format);  }### Answer:
@Test void graphIsNull() { NullPointerException thrown = assertThrows(NullPointerException.class, () -> dot(null)); assertThat(thrown).hasMessageThat().isEqualTo("graph must not be null."); }