Buggy code:
public class PatientUnmarshallTest { @ Test public void testUnmarshaller ( ) throws Exception { JAXBContext c = JAXBContext . newInstance ( Patient . class . getPackage ( ) . getName ( ) ) ; Unmarshaller um = c . createUnmarshaller ( ) ; <START_BUG> InputStream is = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( "src//main//resources//data//patient_example_input.xml" ) ; <END_BUG> Patient patient = ( ( Patient ) ( um . unmarshal ( is ) ) ) ; System . out . println ( patient . getManagingOrganization ( ) . getReference ( ) . getValue ( ) ) ; System . out . println ( patient . getBirthDate ( ) . getValue ( ) . toString ( ) ) ; System . out . println ( patient . getDeceasedBoolean ( ) . isValue ( ) ) ; System . out . println ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getSystem ( ) . getValue ( ) ) ; System . out . println ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getCode ( ) . getValue ( ) ) ; System . out . println ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getDisplay ( ) . getValue ( ) ) ; System . out . println ( patient . getNames ( ) . get ( 0 ) . getGivens ( ) . get ( 0 ) . getValue ( ) ) ; System . out . println ( patient . getNames ( ) . get ( 0 ) . getGivens ( ) . get ( 1 ) . getValue ( ) ) ; System . out . println ( patient . getNames ( ) . get ( 0 ) . getFamilies ( ) . get ( 0 ) . getValue ( ) ) ; System . out . println ( patient . getIdentifiers ( ) . get ( 0 ) . getLabel ( ) . getValue ( ) ) ; System . out . println ( patient . getIdentifiers ( ) . get ( 0 ) . getValue ( ) . getValue ( ) ) ; System . out . println ( patient . getTelecoms ( ) . get ( 0 ) . getUse ( ) . getValue ( ) . toString ( ) ) ; System . out . println ( patient . getTelecoms ( ) . get ( 1 ) . getSystem ( ) . getValue ( ) . toString ( ) ) ; System . out . println ( patient . getTelecoms ( ) . get ( 1 ) . getValue ( ) . getValue ( ) ) ; System . out . println ( patient . getTelecoms ( ) . get ( 1 ) . getUse ( ) . getValue ( ) . toString ( ) ) ; assertEquals ( patient . getManagingOrganization ( ) . getReference ( ) . getValue ( ) , "Organization//1" ) ; assertEquals ( patient . getBirthDate ( ) . getValue ( ) . toString ( ) , "Sat<seq2seq4repair_space>Oct<seq2seq4repair_space>21<seq2seq4repair_space>16:20:00<seq2seq4repair_space>MST<seq2seq4repair_space>2000" ) ; assertEquals ( patient . getDeceasedBoolean ( ) . isValue ( ) , false ) ; assertEquals ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getSystem ( ) . getValue ( ) , "http:////hl7.org//fhir//v3//AdministrativeGender" ) ; assertEquals ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getCode ( ) . getValue ( ) , "M" ) ; assertEquals ( patient . getGender ( ) . getCodings ( ) . get ( 0 ) . getDisplay ( ) . getValue ( ) , "Male" ) ; assertEquals ( patient . getNames ( ) . get ( 0 ) . getGivens ( ) . get ( 0 ) . getValue ( ) , "Peter" ) ; assertEquals ( patient . getNames ( ) . get ( 0 ) . getGivens ( ) . get ( 1 ) . getValue ( ) , "James" ) ; assertEquals ( patient . getNames ( ) . get ( 0 ) . getFamilies ( ) . get ( 0 ) . getValue ( ) , "Chalmers" ) ; assertEquals ( patient . getIdentifiers ( ) . get ( 0 ) . getLabel ( ) . getValue ( ) , "MRN" ) ; assertEquals ( patient . getIdentifiers ( ) . get ( 0 ) . getValue ( ) . getValue ( ) , "12345" ) ; assertEquals ( patient . getTelecoms ( ) . get ( 0 ) . getUse ( ) . getValue ( ) . toString ( ) , "HOME" ) ; assertEquals ( patient . getTelecoms ( ) . get ( 1 ) . getSystem ( ) . getValue ( ) . toString ( ) , "PHONE" ) ; assertEquals ( patient . getTelecoms ( ) . get ( 1 ) . getValue ( ) . getValue ( ) , "(03)<seq2seq4repair_space>5555<seq2seq4repair_space>6473" ) ; assertEquals ( patient . getTelecoms ( ) . get ( 1 ) . getUse ( ) . getValue ( ) . toString ( ) , "WORK" ) ; is . close ( ) ; } }

Fix:
InputStream is = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( "data//patient_example.xml" ) ;