BaleenResource extends Resource_ImplBase { protected boolean doInitialize(ResourceSpecifier specifier, Map<String, Object> additionalParams) throws ResourceInitializationException { return true; }  @Override final boolean initialize(ResourceSpecifier specifier, Map<String, Object> additionalParams); @Override final void destroy();  }
@Test public void testDoInitialize() throws ResourceInitializationException { FakeBaleenResource annotator = new FakeBaleenResource(true); boolean rvTrue = annotator.initialize(new CustomResourceSpecifier_impl(), Maps.newHashMap()); assertTrue(annotator.initialised); assertTrue(rvTrue); FakeBaleenResource failAnnotator = new FakeBaleenResource(false); boolean rvFalse = failAnnotator.initialize(new CustomResourceSpecifier_impl(), Maps.newHashMap()); assertTrue(failAnnotator.initialised); assertFalse(rvFalse); }