AsyncMessageProcessHelper { public String marshalAssertionTypeObject(final AssertionType assertion) { String returnValue = ""; try { final JAXBContextHandler oHandler = new JAXBContextHandler(); final JAXBContext jc = oHandler.getJAXBContext("gov.hhs.fha.nhinc.common.nhinccommon"); final Marshaller marshaller = jc.createMarshaller(); final ByteArrayOutputStream baOutStrm = new ByteArrayOutputStream(); baOutStrm.reset(); final gov.hhs.fha.nhinc.common.nhinccommon.ObjectFactory factory = new gov.hhs.fha.nhinc.common.nhinccommon.ObjectFactory(); final JAXBElement<AssertionType> oJaxbElement = factory.createAssertion(assertion); baOutStrm.close(); marshaller.marshal(oJaxbElement, baOutStrm); final byte[] buffer = baOutStrm.toByteArray(); returnValue = StringUtil.convertToStringUTF8(buffer); } catch (final JAXBException je) { LOG.error("Exception during marshalAssertionTypeObject conversion :" + je, je); } catch (final IOException e) { LOG.error("Exception during marshalAssertionTypeObject conversion :" + e, e); } return returnValue; }  boolean addPatientDiscoveryRequest(final PRPAIN201305UV02 request, final AssertionType assertion,
            final String direction); boolean addPatientDiscoveryRequest(final RespondingGatewayPRPAIN201305UV02RequestType request,
            final String direction); boolean processAck(final String messageId, String newStatus, final String errorStatus,
            final MCCIIN000002UV01 ack); boolean processMessageStatus(final String messageId, final String newStatus); boolean processPatientDiscoveryResponse(final String messageId, String newStatus, final String errorStatus,
            final RespondingGatewayPRPAIN201306UV02RequestType response); AssertionType copyAssertionTypeObject(final AssertionType orig); String marshalAssertionTypeObject(final AssertionType assertion);  }
@Test public void testMarshalAssertionTypeObject() { AssertionType assertion = new AssertionType(); AsyncMessageProcessHelper asyncHelper = createAsyncMessageProcessHelper(); String assertionString = asyncHelper.marshalAssertionTypeObject(assertion); assertNotNull(assertionString); }