Description { public void setExample(String example) { this.examples = new String[1]; this.examples[0] = example; } Description();  Description(String name, String summary, String example);  Description(String name, String summary, String[] examples);  Description(Description description); String getSummary(); void setSummary(String summary); String[] getExamples(); void setExamples(String[] examples); void setExample(String example); String getName(); void setName(String name); static Description getUninitializedDescription(Class<?> clazz);  }
@Test public void testSetExample() { Description d = new Description(); d.setExample("What is 1 + 1?"); assertEquals(1, d.getExamples().length); assertEquals("What is 1 + 1?", d.getExamples()[0]); }