CaseProvisioningAppLauncherHandler { public void verifyCaseAppStatus() { service.call((String ctx) -> { if (isNullOrEmpty(ctx) == false) { addCaseAppLauncher(ctx); } }).getApplicationContext(); }  void verifyCaseAppStatus(); void onCaseManagementProvisioningStartedEvent(@Observes CaseProvisioningStartedEvent event); void onCaseManagementProvisioningCompletedEvent(@Observes CaseProvisioningCompletedEvent event); void onCaseManagementProvisioningFailedEvent(@Observes CaseProvisioningFailedEvent event); @Inject void setCaseProvisioningService(final Caller<CaseProvisioningService> service);  }
@Test public void testVerifyCaseAppEmpty() { when(caseManagementService.getApplicationContext()).thenReturn(""); appLauncherHandler.verifyCaseAppStatus(); verify(appLauncherAddEvent, never()).fire(any(AppLauncherAddEvent.class)); }
@Test public void testVerifyCaseAppNull() { when(caseManagementService.getApplicationContext()).thenReturn(null); appLauncherHandler.verifyCaseAppStatus(); verify(appLauncherAddEvent, never()).fire(any(AppLauncherAddEvent.class)); }
@Test public void testVerifyCaseApp() { when(caseManagementService.getApplicationContext()).thenReturn("/context"); appLauncherHandler.verifyCaseAppStatus(); verify(appLauncherAddEvent).fire(any(AppLauncherAddEvent.class)); }