@Test(expected=IllegalArgumentException.class) public void shouldRejectNullOutputPropertyValue() { Transformation t = new Transformation(); t.addOutputProperty("foo", null); }
public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); }
Transformation { public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); } }
Transformation { public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); } Transformation();  Transformation(Source s); }
Transformation { public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); } Transformation();  Transformation(Source s); void setSource(Source s); void setStylesheet(Source s); void addOutputProperty(String name, String value); void clearOutputProperties(); void addParameter(String name, Object value); void clearParameters(); void setFactory(TransformerFactory f); void setURIResolver(URIResolver r); void setErrorListener(ErrorListener l); void transformTo(Result r); String transformToString(); Document transformToDocument(); }
Transformation { public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); } Transformation();  Transformation(Source s); void setSource(Source s); void setStylesheet(Source s); void addOutputProperty(String name, String value); void clearOutputProperties(); void addParameter(String name, Object value); void clearParameters(); void setFactory(TransformerFactory f); void setURIResolver(URIResolver r); void setErrorListener(ErrorListener l); void transformTo(Result r); String transformToString(); Document transformToDocument();  }