FunctionWriter implements ProcessorConstants, AngularConstants { public void writeOpenFunctionWithDependencies(Writer writer, String object, String... dependencies) throws IOException { writer.append(TAB).append("").append(CR); writer.append(TAB).append(FUNCTION).append(SPACE).append(object).append(OPENPARENTHESIS); writeDependencies(writer, "", dependencies); writer.append(CLOSEPARENTHESIS).append(SPACEOPTIONAL).append(OPENBRACE).append(CR); }  void writeInjectDependenciesOnObject(Writer writer, String object, String... dependencies); void writeOpenFunctionWithDependencies(Writer writer, String object, String... dependencies); void writeCloseFunction(Writer writer);  }
@Test public void testWriteOpenFunctionWithDependencies() throws Exception { System.out.println("writeOpenFunctionWithDependencies"); Writer writer = WriterTest.getMockWriter(); String object = "FACTORY"; doNothing().when(instance).writeDependencies(eq(writer), eq(""), eq("dep1"), eq("dep2")); instance.writeOpenFunctionWithDependencies(writer, object, "dep1", "dep2"); instance.writeCloseFunction(writer); verify(instance).writeDependencies(eq(writer), eq(""), eq("dep1"), eq("dep2")); WriterTest.testBraces(writer); }