MessageGeneratorUtils { public AssertionType cloneWithNewMsgId(AssertionType assertion) { AssertionType newAssertion = clone(assertion); newAssertion.setMessageId(new WSAHeaderHelper().generateMessageID()); return newAssertion; } protected  MessageGeneratorUtils(); static MessageGeneratorUtils getInstance(); NhinTargetSystemType convertFirstToNhinTargetSystemType(NhinTargetCommunitiesType targets); NhinTargetSystemType convertToNhinTargetSystemType(NhinTargetCommunityType target); AssertionType clone(AssertionType assertion); AssertionType cloneWithNewMsgId(AssertionType assertion); AdhocQueryRequest clone(AdhocQueryRequest adhocQueryRequest); PRPAIN201305UV02 clone(PRPAIN201305UV02 request); AssertionType generateMessageId(AssertionType assertion); RegistryResponseType createRegistryErrorResponse(String errorMsg, String errorCode, String status); RegistryResponseType createFailedPolicyCheckResponse(); RegistryResponseType createRegistryErrorResponse(); XDRAcknowledgementType createXDRAckWithRegistryErrorResponse(); RegistryResponseType createMissingDocumentRegistryResponse(); RegistryResponseType createRegistryErrorResponseWithAckFailure(String errorMsg); RegistryResponseType createRegistryBusyErrorResponse(String errorMsg); XDRAcknowledgementType createRegistryErrorXDRAcknowledgementType(String errorMsg); XDRAcknowledgementType createMissingDocumentXDRAcknowledgementType(); XDRAcknowledgementType createFailedPolicyCheckXDRAcknowledgementType(); RegistryResponseType createRegistryResponseSuccess();  }
@Test public void cloneAssertionWithNewMsgId() { AssertionType assertion = new AssertionType(); assertion.setMessageId("11111"); AssertionType copyAssertion = msgUtils.cloneWithNewMsgId(assertion); assertFalse(copyAssertion.getMessageId().equals("11111")); }