FoamApplicationInit { FoamApiKeys getFoamApiKeys() { if(application.getClass().isAnnotationPresent(FoamApiKeys.class)) { return application.getClass().getAnnotation(FoamApiKeys.class); } return null; } FoamApplicationInit(Application application); FoamMain init();  }
@Test public void testGetFoamApiKeysNull(){ class LocalMockApplication extends Application{} LocalMockApplication application = new LocalMockApplication(); FoamApplicationInit foamApplicationInit = new FoamApplicationInit(application); assertNull(foamApplicationInit.getFoamApiKeys()); }
@Test public void testGetFoamApiKeys(){ @FoamApiKeys class LocalMockApplication extends Application{} LocalMockApplication application = new LocalMockApplication(); FoamApplicationInit foamApplicationInit = new FoamApplicationInit(application); assertNotNull(foamApplicationInit.getFoamApiKeys()); }