### Question:
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @CheckPermissionByAccount(action = AuthorizationResourceAction.REGISTER_DATABASE) public DatabaseV4Response register(@Valid DatabaseV4Request request) { DatabaseConfig databaseConfig = converterUtil.convert(request, DatabaseConfig.class); return converterUtil.convert(databaseConfigService.register(databaseConfig, false), 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 testRegister() { when(converterUtil.convert(request, DatabaseConfig.class)).thenReturn(db); when(service.register(db, false)).thenReturn(db); when(converterUtil.convert(db, DatabaseV4Response.class)).thenReturn(response); DatabaseV4Response response = underTest.register(request); assertEquals(db.getName(), response.getName()); }