### Question:
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build == null) { logger.debug(Messages.NO_BUILD_FOUND_FOR_APPLICATION, app.getName()); return false; } if (isBuildStagedCorrectly(build)) { return true; } logMessages(app, build); return false; } ApplicationStager(ProcessContext context); StagingState getStagingState(); boolean isApplicationStagedCorrectly(CloudApplication app); void bindDropletToApplication(UUID appGuid); StepPhase stageApp(CloudApplication app);  }### Answer:
@Test void testIsApplicationStagedCorrectlyMetadataIsNull() { CloudApplication app = createApplication(); Mockito.when(client.getBuildsForApplication(any(UUID.class))) .thenReturn(List.of(Mockito.mock(CloudBuild.class))); Assertions.assertFalse(applicationStager.isApplicationStagedCorrectly(app)); }
@Test void testIsApplicationStagedCorrectlyNoLastBuild() { CloudApplication app = createApplication(); Mockito.when(client.getBuildsForApplication(any(UUID.class))) .thenReturn(Collections.emptyList()); Assertions.assertFalse(applicationStager.isApplicationStagedCorrectly(app)); }