@Override
  public Map<String, Boolean> getProjectUuidToManaged(DbSession dbSession, Set<String> projectUuids) {
    return findManagedProjectService()
      .map(managedProjectService -> managedProjectService.getProjectUuidToManaged(dbSession, projectUuids))
      .orElse(returnNonManagedForAll(projectUuids));
  }
@Test
  public void getProjectUuidToManaged_delegatesToRightService_andPropagateAnswer() {
    Set<String> projectUuids = Set.of("a", "b");
    Map<String, Boolean> serviceResponse = Map.of("a", false, "b", true);

    ManagedInstanceService anotherManagedProjectService = getManagedProjectService(projectUuids, serviceResponse);
    DelegatingManagedServices managedInstanceService = new DelegatingManagedServices(Set.of(new NeverManagedInstanceService(), anotherManagedProjectService));

    Map<String, Boolean> projectUuidToManaged = managedInstanceService.getProjectUuidToManaged(dbSession, projectUuids);

    assertThat(projectUuidToManaged).containsExactlyInAnyOrderEntriesOf(serviceResponse);
  }