@Test
public void removeByUserIdAndAppTokenAndSchemaVersionTest() throws IOException {
EndpointUserDto userDto = generateEndpointUserDto(null);
ApplicationDto appDto = generateApplicationDto();
ConfigurationSchemaDto schema = generateConfSchemaDto(null, appDto.getId(), 1).get(0);
generateEndpointUserConfigurationDto(userDto, appDto, schema, readSchemaFileAsString(OVERRIDE_USER_DATA_JSON));
generateEndpointUserConfigurationDto(userDto, appDto, null, readSchemaFileAsString(OVERRIDE_USER_DATA_JSON));
generateEndpointUserConfigurationDto(userDto, appDto, null, readSchemaFileAsString(OVERRIDE_USER_DATA_JSON));
userConfigurationService.removeByUserIdAndAppTokenAndSchemaVersion(userDto.getId(), appDto.getApplicationToken(), schema.getVersion());
EndpointUserConfigurationDto removed = userConfigurationService.findUserConfigurationByUserIdAndAppTokenAndSchemaVersion(userDto.getId(), appDto.getApplicationToken(), schema.getVersion());
Assert.assertNull(removed);
List<EndpointUserConfigurationDto> foundList = userConfigurationService.findUserConfigurationByUserId(userDto.getId());
Assert.assertEquals(2, foundList.size());
}