LynxConfig implements Serializable, Cloneable { public LynxConfig setFilter(String filter) { if (filter == null) { throw new IllegalArgumentException("filter can't be null"); } this.filter = filter; return this; } LynxConfig(); LynxConfig setMaxNumberOfTracesToShow(int maxNumberOfTracesToShow); LynxConfig setFilter(String filter); LynxConfig setFilterTraceLevel(TraceLevel filterTraceLevel); LynxConfig setTextSizeInPx(float textSizeInPx); LynxConfig setSamplingRate(int samplingRate); int getMaxNumberOfTracesToShow(); String getFilter(); TraceLevel getFilterTraceLevel(); boolean hasFilter(); float getTextSizeInPx(); boolean hasTextSizeInPx(); int getSamplingRate(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object clone(); @Override String toString();  }
@Test public void setFilterNullThrowsNPE() { exception.expect(IllegalArgumentException.class); exception.expectMessage("filter can't be null"); LynxConfig lynxConfig = new LynxConfig(); lynxConfig.setFilter(null); }