HL7ReceiverTransforms { public static MCCIMT000100UV01Receiver createMCCIMT000100UV01Receiver(String OID) { MCCIMT000100UV01Receiver receiver = new MCCIMT000100UV01Receiver(); if (OID == null) { OID = ""; } receiver.setTypeCode(CommunicationFunctionType.RCV); MCCIMT000100UV01Device receiverDevice = new MCCIMT000100UV01Device(); receiverDevice.setDeterminerCode(HL7Constants.RECEIVER_DETERMINER_CODE); receiverDevice.setClassCode(EntityClassDevice.DEV); receiverDevice.getId().add(HL7DataTransformHelper.IIFactory(OID)); MCCIMT000100UV01Agent agent = new MCCIMT000100UV01Agent(); MCCIMT000100UV01Organization org = new MCCIMT000100UV01Organization(); org.setClassCode(HL7Constants.ORG_CLASS_CODE); org.setDeterminerCode(HL7Constants.RECEIVER_DETERMINER_CODE); II id = HL7DataTransformHelper.IIFactory(OID); org.getId().add(id); javax.xml.namespace.QName xmlqnameorg = new javax.xml.namespace.QName("urn:hl7-org:v3", "representedOrganization"); JAXBElement<MCCIMT000100UV01Organization> orgElem = new JAXBElement<>(xmlqnameorg, MCCIMT000100UV01Organization.class, org); agent.setRepresentedOrganization(orgElem); agent.getClassCode().add(HL7Constants.AGENT_CLASS_CODE); javax.xml.namespace.QName xmlqnameagent = new javax.xml.namespace.QName("urn:hl7-org:v3", "asAgent"); JAXBElement<MCCIMT000100UV01Agent> agentElem = new JAXBElement<>(xmlqnameagent, MCCIMT000100UV01Agent.class, agent); receiverDevice.setAsAgent(agentElem); receiver.setDevice(receiverDevice); return receiver; }  static MCCIMT000200UV01Receiver createMCCIMT000200UV01Receiver(String OID); static MCCIMT000100UV01Receiver createMCCIMT000100UV01Receiver(String OID); static MCCIMT000300UV01Receiver createMCCIMT000300UV01Receiver(String OID);  }
@Test public void createMCCIMT000100UV01Receiver() { String OID = null; HL7ReceiverTransforms transforms = new HL7ReceiverTransforms(); MCCIMT000100UV01Receiver receiver = transforms.createMCCIMT000100UV01Receiver(OID); assertNull(receiver.getDevice().getId().get(0).getRoot()); assertNull(receiver.getDevice().getAsAgent().getValue().getRepresentedOrganization().getValue().getId().get(0) .getRoot()); }