### Question:
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @DisableCheckPermissions public DatabaseV4Responses list(String environmentCrn) { return new DatabaseV4Responses(converterUtil.convertAllAsSet(databaseConfigService.findAll(environmentCrn), DatabaseV4Response.class)); }  @Override @DisableCheckPermissions DatabaseV4Responses list(String environmentCrn); @Override @CheckPermissionByAccount(action = AuthorizationResourceAction.REGISTER_DATABASE) DatabaseV4Response register(@Valid DatabaseV4Request request); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) DatabaseV4Response getByCrn(@ResourceCrn String crn); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DESCRIBE_DATABASE) DatabaseV4Response getByName(String environmentCrn, @ResourceName String name); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DELETE_DATABASE) DatabaseV4Response deleteByCrn(@ResourceCrn String crn); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DELETE_DATABASE) DatabaseV4Response deleteByName(String environmentCrn, @ResourceName String name); @Override @CheckPermissionByResourceCrnList(action = AuthorizationResourceAction.DELETE_DATABASE) DatabaseV4Responses deleteMultiple(@ResourceCrnList Set<String> crns); @Override @DisableCheckPermissions DatabaseTestV4Response test(@Valid DatabaseTestV4Request databaseTestV4Request);  }### Answer:
@Test public void testList() { Set<DatabaseConfig> dbSet = Collections.singleton(db); when(service.findAll(ENVIRONMENT_CRN)).thenReturn(dbSet); Set<DatabaseV4Response> responseSet = Collections.singleton(response); when(converterUtil.convertAllAsSet(dbSet, DatabaseV4Response.class)).thenReturn(responseSet); DatabaseV4Responses responses = underTest.list(ENVIRONMENT_CRN); assertEquals(1, responses.getResponses().size()); assertEquals(response.getName(), responses.getResponses().iterator().next().getName()); }