@Override public EndpointGroupDto getEndpointGroup(String endpointGroupId) throws ControlServiceException { return endpointService.findEndpointGroupById(endpointGroupId); }
@Override public EndpointGroupDto compute(String key) { LOG.debug("Fetching result for token id"); EndpointGroupDto groupDto = endpointService.findEndpointGroupById(key); return groupDto; }
@Test(expected = IncorrectParameterException.class) public void findEndpointGroupByIdTest() { EndpointGroupDto group = generateEndpointGroupDto(null); EndpointGroupDto foundGroup = endpointService.findEndpointGroupById(group.getId()); Assert.assertNotNull(foundGroup); group = endpointService.findEndpointGroupById(INCORRECT_ID); }
EndpointGroupDto endpointGroup = null; if (!StringUtils.isBlank(egs.getEndpointGroupId())) { endpointGroup = endpointService.findEndpointGroupById(egs.getEndpointGroupId()); if (endpointGroup != null) { endpointGroups.add(endpointGroup);
@Test(expected = IncorrectParameterException.class) public void saveEndpointGroupWithSameWeightTest() { EndpointGroupDto group = generateEndpointGroupDto(null); EndpointGroupDto found = endpointService.findEndpointGroupById(group.getId()); found.setId(null); endpointService.saveEndpointGroup(found); }
@Test(expected = IncorrectParameterException.class) public void saveEndpointGroupWithSameNameTest() { EndpointGroupDto group = generateEndpointGroupDto(null); EndpointGroupDto found = endpointService.findEndpointGroupById(group.getId()); found.setId(null); found.setWeight(found.getWeight() + 1); endpointService.saveEndpointGroup(found); }