@Override public List<VersionDto> getVacantConfigurationSchemasByEndpointGroupId(String endpointGroupId) throws ControlServiceException { return configurationService.findVacantSchemasByEndpointGroupId(endpointGroupId); }
@Test public void findVacantSchemasByEndpointGroupIdTest() { ApplicationDto application = generateApplicationDto(); List<ConfigurationSchemaDto> schemas = generateConfSchemaDto(null, application.getId(), 4); EndpointGroupDto groupOne = generateEndpointGroupDto(application.getId()); ConfigurationSchemaDto schemaOne = schemas.get(0); generateConfigurationDto(schemaOne.getId(), groupOne.getId(), 1, true, false); EndpointGroupDto groupTwo = generateEndpointGroupDto(application.getId()); List<VersionDto> schemasOne = configurationService.findVacantSchemasByEndpointGroupId(groupOne.getId()); Assert.assertFalse(schemasOne.isEmpty()); Assert.assertEquals(4, schemasOne.size()); List<VersionDto> schemasTwo = configurationService.findVacantSchemasByEndpointGroupId(groupTwo.getId()); Assert.assertFalse(schemasTwo.isEmpty()); Assert.assertEquals(5, schemasTwo.size()); }