@Test
  public void deleteLocatorSuccess() throws ServiceException {
    // Arrange
    LocatorType locatorType = LocatorType.SAS;
    LocatorInfo locatorInfo =
        service.create(Locator.create(accessPolicyInfo.getId(), assetInfo.getId(), locatorType));
    ListResult<LocatorInfo> listLocatorsResult = service.list(Locator.list());
    int assetCountBaseline = listLocatorsResult.size();

    // Act
    service.delete(Locator.delete(locatorInfo.getId()));

    // Assert
    listLocatorsResult = service.list(Locator.list());
    assertEquals("listLocatorsResult.size", assetCountBaseline - 1, listLocatorsResult.size());

    expectedException.expect(ServiceException.class);
    expectedException.expect(new ServiceExceptionMatcher(404));
    service.get(Locator.get(locatorInfo.getId()));
  }
 @Test
 public void deleteLocatorInvalidIdFailed() throws ServiceException {
   expectedException.expect(ServiceException.class);
   expectedException.expect(new ServiceExceptionMatcher(400));
   service.delete(Locator.delete(invalidId));
 }