@Test
public void testAddPatientRegistryRecord() throws Throwable {

	// Arrange
	final String c32XmlMock = "c32XmlMock";
	final String hl7v3XmlMock = "hl7v3XmlMock";
	final String eIdMock = "eIdMock";
	final String addMsgMock = "addMsgMock";
	// PRPAIN201309UV02 requestMock = mock(PRPAIN201309UV02.class);
	// PRPAIN201310UV02 responseMock = mock(PRPAIN201310UV02.class);
	final MCCIIN000002UV01 expectedResponseMock = mock(MCCIIN000002UV01.class);
	final Map<String, String> queryMapMock = new HashMap<String, String>();
	queryMapMock.put(PixManagerConstants.GLOBAL_DOMAIN_ID, eIdMock);
	sut.setPixManagerTransformService(pixManagerTransformServiceMock);
	sut.setPixMgrService(pixMgrServiceMock);
	sut.setRequestXMLToJava(requestXMLToJavaMock);
	sut.setPixManagerTransformService(pixManagerTransformServiceMock);
	sut.setXdsbRegistryGetter(xdsbRegistryGetterMock);
	sut.setMarshaller(marshallerMock);
	when(
			pixManagerTransformServiceMock.getPixXml(PixOperation.QUERY,
					c32XmlMock)).thenReturn(hl7v3XmlMock);
	// when(pixManagerTransformServiceMock.getPixQueryXml(c32XmlMock)).thenReturn(hl7v3XmlMock);
	when(
			pixManagerTransformServiceMock.getPixXml(PixOperation.ADD,
					c32XmlMock)).thenReturn(hl7v3XmlMock);
	// when(pixManagerTransformServiceMock.getPixAddXml(c32XmlMock)).thenReturn(hl7v3XmlMock);
	when(
			xdsbRegistryGetterMock.pidFeed(PixOperation.ADD, hl7v3XmlMock,
					eIdMock, PixManagerConstants.GLOBAL_DOMAIN_ID))
			.thenReturn(addMsgMock);
	// when(xdsbRegistryGetterMock.addPatientRegistryRecord(hl7v3XmlMock,eIdMock,
	// PixManagerConstants.GLOBAL_DOMAIN_ID)).thenReturn(addMsgMock);
	when(
			marshallerMock.unmarshalFromXml(MCCIIN000002UV01.class,
					addMsgMock)).thenReturn(expectedResponseMock);
	// when(requestXMLToJavaMock.getPIXQueryReqObject(hl7v3XmlMock,PixManagerConstants.ENCODE_STRING)).thenReturn(requestMock);
	// when(pixMgrServiceMock.pixManagerPRPAIN201309UV02(requestMock)).thenReturn(responseMock);
	when(pixMgrBeanMock.getQueryIdMap()).thenReturn(queryMapMock);
	doReturn(pixMgrBeanMock).when(sut).queryPerson(hl7v3XmlMock);
	// Act
	final MCCIIN000002UV01 actRetResponse = sut
			.addPatientRegistryRecord(c32XmlMock);
	// Assert
	assertEquals(expectedResponseMock, actRetResponse);
}