PixManagerTransformServiceImpl implements
		PixManagerTransformService { @Override public String getPixXml(PixOperation operation, String c32xml) throws Hl7v3TransformerException { return hl7v3Transformer.transformToHl7v3PixXml(c32xml, resolveOperation(operation)); }  @Override String getPixAddXml(String c32xml); @Override String getPixUpdateXml(String c32xml); @Override String getPixQueryXml(String c32xml); @Override String getPixXml(PixOperation operation, String c32xml);  }
@Test public void testGetPixXml() throws Hl7v3TransformerException { String c32XmlMock = "c32XmlMock"; String pixAddXmlMock = "pixAddXmlMock"; String pixUpdateXmlMock = "pixUpdateXmlMock"; String pixQueryXmlMock = "pixQueryXmlMock"; String nullReturnMock = "nullReturnMock"; when( hl7v3TransformerMock.transformToHl7v3PixXml(c32XmlMock, Hl7v3Transformer.XSLT_C32_TO_PIX_ADD)).thenReturn( pixAddXmlMock); when( hl7v3TransformerMock.transformToHl7v3PixXml(c32XmlMock, Hl7v3Transformer.XSLT_C32_TO_PIX_UPDATE)).thenReturn( pixUpdateXmlMock); when( hl7v3TransformerMock.transformToHl7v3PixXml(c32XmlMock, Hl7v3Transformer.XSLT_C32_TO_PIX_QUERY)).thenReturn( pixQueryXmlMock); when(hl7v3TransformerMock.transformToHl7v3PixXml(c32XmlMock, null)) .thenReturn(nullReturnMock); String addResponse = sut.getPixXml(PixOperation.ADD, c32XmlMock); String updateResponse = sut.getPixXml(PixOperation.UPDATE, c32XmlMock); String queryResponse = sut.getPixXml(PixOperation.QUERY, c32XmlMock); String nullResponse = sut.getPixXml(PixOperation.MERGE, c32XmlMock); assertEquals(pixAddXmlMock, addResponse); assertEquals(pixUpdateXmlMock, updateResponse); assertEquals(pixQueryXmlMock, queryResponse); assertEquals(nullReturnMock, nullResponse); }