OcelotProcessor extends AbstractProcessor { String getJsFramework(Map<String, String> options) { if (null != options) { if (options.containsKey(ProcessorConstants.FRAMEWORK)) { return options.get(ProcessorConstants.FRAMEWORK); } } return null; }  @Override void init(ProcessingEnvironment processingEnv); @Override boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv); void processElement(Element element);  }
@Test public void getJsFrameworkTest() { System.out.println("getJsFramework"); Map<String, String> map = new HashMap<>(); Object result = instance.getJsFramework(map); assertThat(result).isNull(); String fwk = "ng"; map.put(ProcessorConstants.FRAMEWORK, fwk); result = instance.getJsFramework(map); assertThat(result).isEqualTo(fwk); map.put(ProcessorConstants.FRAMEWORK, null); result = instance.getJsFramework(map); assertThat(result).isNull(); result = instance.getJsFramework(null); assertThat(result).isNull(); }