@Test public void testGetByCrn() { when(service.getByCrn(DB_CRN)).thenReturn(db); when(converterUtil.convert(db, DatabaseV4Response.class)).thenReturn(response); DatabaseV4Response response = underTest.getByCrn(DB_CRN); assertEquals(db.getName(), response.getName()); }
@Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) public DatabaseV4Response getByCrn(@ResourceCrn String crn) { DatabaseConfig databaseConfig = databaseConfigService.getByCrn(crn); return converterUtil.convert(databaseConfig, DatabaseV4Response.class); }
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) public DatabaseV4Response getByCrn(@ResourceCrn String crn) { DatabaseConfig databaseConfig = databaseConfigService.getByCrn(crn); return converterUtil.convert(databaseConfig, DatabaseV4Response.class); } }
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) public DatabaseV4Response getByCrn(@ResourceCrn String crn) { DatabaseConfig databaseConfig = databaseConfigService.getByCrn(crn); return converterUtil.convert(databaseConfig, DatabaseV4Response.class); }  }
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) public DatabaseV4Response getByCrn(@ResourceCrn String crn) { DatabaseConfig databaseConfig = databaseConfigService.getByCrn(crn); return converterUtil.convert(databaseConfig, 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); }
DatabaseV4Controller implements DatabaseV4Endpoint { @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_DATABASE) public DatabaseV4Response getByCrn(@ResourceCrn String crn) { DatabaseConfig databaseConfig = databaseConfigService.getByCrn(crn); return converterUtil.convert(databaseConfig, 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);  }