@Override public ServerProfileSchemaDto findLatestServerProfileSchema(String applicationId) throws ControlServiceException { return serverProfileService.findLatestServerProfileSchema(applicationId); }
== null) { ServerProfileSchemaDto serverProfileSchemaDto = serverProfileService .findLatestServerProfileSchema(endpointProfileDto.getApplicationId()); CTLSchemaDto schemaDto = ctlService.findCtlSchemaById( serverProfileSchemaDto.getCtlSchemaId());
@Test public void testFindLatestServerProfileSchema() { ApplicationDto app = generateApplicationDto(); generateServerProfileSchema(app.getId(), app.getTenantId()); generateServerProfileSchema(app.getId(), app.getTenantId()); generateServerProfileSchema(app.getId(), app.getTenantId()); generateServerProfileSchema(app.getId(), app.getTenantId()); ServerProfileSchemaDto expected = generateServerProfileSchema(app.getId(), app.getTenantId()); ServerProfileSchemaDto last = serverProfileService.findLatestServerProfileSchema(app.getId()); Assert.assertEquals(expected, last); }