OcelotProcessor extends AbstractProcessor { void writeCoreInDirectory(String dir, String fwk) { if (dir != null) { fws.copyResourceToDir(ProcessorConstants.SEPARATORCHAR + "js", getFilename("core", fwk), dir); } }  @Override void init(ProcessingEnvironment processingEnv); @Override boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv); void processElement(Element element);  }
@Test public void writeCoreInDirectoryTestDoNothing() { System.out.println("writeCoreInDirectory"); instance.writeCoreInDirectory(null, "ng"); instance.writeCoreInDirectory(null, null); verify(fws, never()).copyResourceToDir(anyString(), anyString(), anyString()); }
@Test public void writeCoreInDirectoryTestDoNoFwk() { System.out.println("writeCoreInDirectory"); instance.writeCoreInDirectory(File.separatorChar + "tmp", null); verify(fws).copyResourceToDir(anyString(), eq("core.js"), anyString()); }
@Test public void writeCoreInDirectoryTestNg() { System.out.println("writeCoreInDirectory"); instance.writeCoreInDirectory(File.separatorChar + "tmp", "ng"); verify(fws).copyResourceToDir(anyString(), eq("core.ng.js"), anyString()); }