### Question:
SystemPropertiesDescriptionGenerator implements Generator { public String generate(List<DocAnnotationData> list) { return generate(list, AcceptAllSpringValueFilter.INSTANCE); } SystemPropertiesDescriptionGenerator(); String generate(List<DocAnnotationData> list); String generate(List<DocAnnotationData> list, SpringValueFilter filter);  }### Answer:
@Test public void even_when_list_is_null_result_is_not_null_but_empty() throws Exception { when(collector.fetchMustBeDocumentParts()).thenReturn(null); String generated = generatorToTest.generate(null); assertNotNull(generated); assertTrue(generated.isEmpty()); }
@Test public void when_param_is_empty_list_result_is_not_null_but_empty() throws Exception { String generated = generatorToTest.generate(Collections.emptyList()); assertNotNull(generated); assertTrue(generated.isEmpty()); }
@Test public void when_list_contains_one_entry_but_not_with_spring_value_1_result_is_empty() throws Exception { DocAnnotationData a = new DocAnnotationData(); List<DocAnnotationData> list = new ArrayList<>(); list.add(a); String generated = generatorToTest.generate(list); assertNotNull(generated); assertTrue(generated.isEmpty()); }
@Test public void when_collector_returns_one_entry_with_spring_value_1_a_table_is_build() throws Exception { DocAnnotationData a = new DocAnnotationData(); a.springValue="${something}"; a.description="the description"; List<DocAnnotationData> list = new ArrayList<>(); list.add(a); String generated = generatorToTest.generate(list); assertNotNull(generated); assertFalse(generated.isEmpty()); assertTrue(generated.indexOf("|===")!=-1); }