FunctionWriter implements ProcessorConstants, AngularConstants { public void writeInjectDependenciesOnObject(Writer writer, String object, String... dependencies) throws IOException { if (dependencies != null && dependencies.length > 0) { writer.append(TAB).append(object).append(DOT).append("$inject").append(SPACEOPTIONAL).append(EQUALS).append(SPACEOPTIONAL).append(OPENBRACKET); writeDependencies(writer, "'", dependencies); writer.append(CLOSEBRACKET).append(SEMICOLON).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 testWriteInjectDependenciesOnObject() throws Exception { System.out.println("writeInjectDependenciesOnObject"); Writer writer = WriterTest.getMockWriter(); String object = "FACTORY"; doNothing().when(instance).writeDependencies(eq(writer), eq("'"), eq("dep1"), eq("dep2")); instance.writeInjectDependenciesOnObject(writer, object, "dep1", "dep2"); verify(instance).writeDependencies(eq(writer), eq("'"), eq("dep1"), eq("dep2")); List<String> allValues = WriterTest.testBraces(writer); }