@SuppressWarnings("unchecked")
@Test
public void testQueryPerson_Query_Failure_IOException()
		throws Hl7v3TransformerException, JAXBException, IOException {

	// Arrange
	String expectedErrorMessage = "Query Failure! Server error! A unexpected error has occured";
	String hl7v3 = "hl7v3";
	when(
			hl7v3Transformer.getPixQueryXml(MRN, MRN_DOMAIN,
					Hl7v3Transformer.XML_PIX_QUERY)).thenReturn(hl7v3);
	when(
			requestXMLToJava.getPIXQueryReqObject(hl7v3,
					PixManagerConstants.ENCODE_STRING)).thenThrow(
			IOException.class);
	// Act
	PixManagerBean bean = sut.queryPatient(MRN, MRN_DOMAIN);
	// Assert
	assertEquals(expectedErrorMessage, bean.getQueryMessage());
}