private void verifyLocatorProperties(
      String message,
      String accessPolicyId,
      String assetId,
      LocatorType locatorType,
      Date startTime,
      String id,
      String path,
      LocatorInfo actualLocator) {
    assertNotNull(message, actualLocator);
    assertEquals(message + " accessPolicyId", accessPolicyId, actualLocator.getAccessPolicyId());
    assertEquals(message + " assetId", assetId, actualLocator.getAssetId());
    assertEquals(message + " locatorType", locatorType, actualLocator.getLocatorType());

    assertDateApproxEquals(message + " startTime", startTime, actualLocator.getStartTime());

    if (id == null) {
      assertNotNull(message + " Id", actualLocator.getId());
    } else {
      assertEquals(message + " Id", id, actualLocator.getId());
    }
    if (path == null) {
      assertNotNull(message + " path", actualLocator.getPath());
    } else {
      assertEquals(message + " path", path, actualLocator.getPath());
    }
  }
 private void verifyLocatorInfosEqual(String message, LocatorInfo expected, LocatorInfo actual) {
   verifyLocatorProperties(
       message,
       expected.getAccessPolicyId(),
       expected.getAssetId(),
       expected.getLocatorType(),
       expected.getStartTime(),
       expected.getId(),
       expected.getPath(),
       actual);
 }