PixManagerRequestXMLToJava { public PRPAIN201302UV02 getPIXUpdateReqObject(String reqXMLFilePath, String encodeString) throws JAXBException, IOException { PRPAIN201302UV02 reqObj = null; reqObj = getPIXReqObject(PRPAIN201302UV02.class, reqXMLFilePath); return reqObj; } PixManagerRequestXMLToJava();  PixManagerRequestXMLToJava(SimpleMarshaller marshaller); PRPAIN201301UV02 getPIXAddReqObject(String reqXMLFilePath,
			String encodeString); PRPAIN201302UV02 getPIXUpdateReqObject(String reqXMLFilePath,
			String encodeString); PRPAIN201309UV02 getPIXQueryReqObject(String reqXMLFilePath,
			String encodeString);  }
@Test public void testGetPIXUpdateReqObject_by_ValidDomainXMLFile() throws JAXBException, IOException { String expectedItVersion = "XML_1.0"; String expectedFirstName = "WILMA"; PRPAIN201302UV02 pRPAIN201302UV02 = cstl.getPIXUpdateReqObject( "xml/PRPA_IN201302UV02_PIXUpdate_Addr_Req.xml", encodeString); String actualItversion = pRPAIN201302UV02.getITSVersion(); JXPathContext context = JXPathContext.newContext(pRPAIN201302UV02); String actualFirstName = (String) context .getValue("controlActProcess/subject[1]/registrationEvent/subject1/patient/patientPerson/value/name[1]/content[2]/value/content"); assertEquals(expectedItVersion, actualItversion); assertEquals(expectedFirstName, actualFirstName); }
@Test public void testGetPIXUpdateReqObject_by_ValidDomainXMLString() throws JAXBException, IOException, URISyntaxException { String expectedItVersion = "XML_1.0"; String xmlString = FileUtils.readFileToString(new File(getClass() .getClassLoader() .getResource("xml/PRPA_IN201302UV02_PIXUpdate_Addr_Req.xml") .toURI())); PRPAIN201302UV02 pRPAIN201302UV02 = cstl.getPIXUpdateReqObject( xmlString, encodeString); String actualItversion = pRPAIN201302UV02.getITSVersion(); assertEquals(expectedItVersion, actualItversion); }
@Test public void testGetPIXUpdateReqObject_by_null_Exception() throws JAXBException, IOException { thrown.expect(JAXBException.class); cstl.getPIXUpdateReqObject(null, encodeString); }
@Ignore("Not required anymore since the marshaller implementation is changed") @Test public void testGetPIXUpdateReqObject_by_usup_Exception() throws JAXBException, IOException, URISyntaxException { thrown.expect(JAXBException.class); String xmlString = FileUtils.readFileToString(new File(getClass() .getClassLoader() .getResource("xml/PRPA_IN201302UV02_PIXUpdate_Addr_Req.xml") .toURI())); cstl.getPIXUpdateReqObject(xmlString, "UTF-123"); }