ModuleWriter implements ProcessorConstants, AngularConstants { public void writeAddition(Writer writer, String type, String name) throws IOException { writer.append(TAB).append(ANGULAR_MODULE).append(OPENPARENTHESIS).append(MODULENAME).append(CLOSEPARENTHESIS) .append(DOT).append(type).append(OPENPARENTHESIS); if(name!=null) { writer.append("'").append(name).append("'").append(COMMA).append(SPACEOPTIONAL); } writer.append(type).append(CLOSEPARENTHESIS).append(SEMICOLON).append(CR); }  void writeModule(Writer writer); void writeAddition(Writer writer, String type, String name);  }
@Test public void testWriteAddition() throws Exception { System.out.println("writeAddition"); Writer writer = WriterTest.getMockWriter(); String type = "TYPE"; String name = "NAME"; instance.writeAddition(writer, type, name); List<String> allValues = WriterTest.testBraces(writer); assertThat(allValues).contains(type, name); }