@Override
  public Map<String, Boolean> getUserUuidToManaged(DbSession dbSession, Set<String> userUuids) {
    return findManagedInstanceService()
      .map(managedInstanceService -> managedInstanceService.getUserUuidToManaged(dbSession, userUuids))
      .orElse(returnNonManagedForAll(userUuids));
  }
@Test
  public void getUserUuidToManaged_delegatesToRightService_andPropagateAnswer() {
    Set<String> userUuids = Set.of("a", "b");
    Map<String, Boolean> serviceResponse = Map.of("a", false, "b", true);

    ManagedInstanceService anotherManagedInstanceService = getManagedInstanceService(userUuids, serviceResponse);
    DelegatingManagedServices managedInstanceService = new DelegatingManagedServices(Set.of(new NeverManagedInstanceService(), anotherManagedInstanceService));

    Map<String, Boolean> userUuidToManaged = managedInstanceService.getUserUuidToManaged(dbSession, userUuids);

    assertThat(userUuidToManaged).containsExactlyInAnyOrderEntriesOf(serviceResponse);
  }