SenderReceiverHelperMCCIMT000200UV01 { public static MCCIMT000200UV01Receiver CreateReceiver(II receiverDeviceId) { MCCIMT000200UV01Receiver receiver = new MCCIMT000200UV01Receiver(); receiver.setTypeCode(CommunicationFunctionType.RCV); receiver.setDevice(createDevice(receiverDeviceId)); return receiver; }  static MCCIMT000200UV01Sender CreateSender(II senderDeviceId); static MCCIMT000200UV01Sender CreateSender(); static MCCIMT000200UV01Receiver CreateReceiver(II receiverDeviceId); static MCCIMT000200UV01Receiver CreateReceiver();  }
@Test public void testCreateReceiver() { SenderReceiverHelperMCCIMT000200UV01 receiver = new SenderReceiverHelperMCCIMT000200UV01(); MCCIMT000200UV01Receiver receiverDevice = new MCCIMT000200UV01Receiver(); receiverDevice = receiver.CreateReceiver(createReceiverDevice()); assertEquals(receiverDevice.getDevice().getId().get(0).getAssigningAuthorityName(), "CONNECTReceiver"); assertEquals(receiverDevice.getDevice().getId().get(0).getExtension(), "D123401"); assertEquals(receiverDevice.getDevice().getId().get(0).getRoot(), "2.2"); }
@Test public void testCreateReceiverWhenDeviceIdNull() { SenderReceiverHelperMCCIMT000200UV01 receiver = new SenderReceiverHelperMCCIMT000200UV01(); MCCIMT000200UV01Receiver receiverDevice = new MCCIMT000200UV01Receiver(); receiverDevice = receiver.CreateReceiver(); assertNull(receiverDevice.getDevice().getId().get(0)); }