@Override public List<ConfigurationRecordDto> getConfigurationRecordsByEndpointGroupId( String endpointGroupId, boolean includeDeprecated) throws ControlServiceException { return new ArrayList<>(configurationService.findAllConfigurationRecordsByEndpointGroupId( endpointGroupId, includeDeprecated)); }
@Test public void findAllConfigurationRecordsByEndpointGroupIdTest() { String id = generateApplicationDto().getId(); ConfigurationSchemaDto schema = generateConfSchemaDto(null, id, 1).get(0); EndpointGroupDto group = generateEndpointGroupDto(id); generateConfigurationDto(schema.getId(), group.getId(), 1, true, false); List<ConfigurationRecordDto> records = (List<ConfigurationRecordDto>) configurationService .findAllConfigurationRecordsByEndpointGroupId(group.getId(), false); Assert.assertNotNull(records); Assert.assertEquals(1, records.size()); ConfigurationDto activeConfiguration = records.get(0).getActiveStructureDto(); Assert.assertEquals(UpdateStatus.ACTIVE, activeConfiguration.getStatus()); ConfigurationDto inactiveConfiguration = records.get(0).getInactiveStructureDto(); Assert.assertNull(inactiveConfiguration); }