@Test void isChildEnvironmentFalse() { when(repository.findParentStackByChildEnvironmentCrn(ENVIRONMENT_CRN, ACCOUNT_ID)).thenReturn(Optional.empty()); boolean result = underTest.isChildEnvironment(ENVIRONMENT_CRN, ACCOUNT_ID); assertFalse(result); }
public boolean isChildEnvironment(String environmentCrn, String accountId) { return repository.findParentStackByChildEnvironmentCrn(environmentCrn, accountId).isPresent(); }
ChildEnvironmentService { public boolean isChildEnvironment(String environmentCrn, String accountId) { return repository.findParentStackByChildEnvironmentCrn(environmentCrn, accountId).isPresent(); } }
ChildEnvironmentService { public boolean isChildEnvironment(String environmentCrn, String accountId) { return repository.findParentStackByChildEnvironmentCrn(environmentCrn, accountId).isPresent(); }  }
ChildEnvironmentService { public boolean isChildEnvironment(String environmentCrn, String accountId) { return repository.findParentStackByChildEnvironmentCrn(environmentCrn, accountId).isPresent(); }  boolean isChildEnvironment(String environmentCrn, String accountId); Optional<Stack> findParentByEnvironmentCrnAndAccountId(String environmentCrn, String accountId); List<ChildEnvironment> findChildEnvironments(Stack stack, String accountId); void attachChildEnvironment(AttachChildEnvironmentRequest request, String accountId); void detachChildEnvironment(DetachChildEnvironmentRequest request, String accountId); }
ChildEnvironmentService { public boolean isChildEnvironment(String environmentCrn, String accountId) { return repository.findParentStackByChildEnvironmentCrn(environmentCrn, accountId).isPresent(); }  boolean isChildEnvironment(String environmentCrn, String accountId); Optional<Stack> findParentByEnvironmentCrnAndAccountId(String environmentCrn, String accountId); List<ChildEnvironment> findChildEnvironments(Stack stack, String accountId); void attachChildEnvironment(AttachChildEnvironmentRequest request, String accountId); void detachChildEnvironment(DetachChildEnvironmentRequest request, String accountId);  }