RemoveObjectsRequestValidator implements Validator<EbXMLRemoveObjectsRequest, ValidationProfile> { @Override public void validate(EbXMLRemoveObjectsRequest request, ValidationProfile profile) { if (profile.getInteractionId() == IpfInteractionId.ITI_62) { metaDataAssert(request.getReferences().size() > 0, EMPTY_REFERENCE_LIST, "RemoveObjectsRequest"); metaDataAssert(request.getDeletionScope().equals(DEFAULT_DELETION_SCOPE), WRONG_DELETION_SCOPE, DEFAULT_DELETION_SCOPE); metaDataAssert(request.getId() == null && request.getHome() == null && request.getSlots().size() == 0, OBJECT_SHALL_NOT_BE_SPECIFIED, "AdhocQuery"); } }  @Override void validate(EbXMLRemoveObjectsRequest request, ValidationProfile profile);  }
@Test public void testValidateGoodCase() { validator.validate(transformer.toEbXML(request), profile); }