SenderReceiverHelper { public static MCCIMT000100UV01Receiver CreateReceiver(String receiverDeviceId) { MCCIMT000100UV01Receiver receiver = new MCCIMT000100UV01Receiver(); receiver.setTypeCode(CommunicationFunctionType.RCV); receiver.setDevice(createDevice(receiverDeviceId)); return receiver; }  static MCCIMT000100UV01Sender CreateSender(String senderDeviceId); static MCCIMT000100UV01Sender CreateSender(); static MCCIMT000100UV01Receiver CreateReceiver(String receiverDeviceId); static MCCIMT000100UV01Receiver CreateReceiver();  }
@Test public void CreateReceiver() { MCCIMT000100UV01Receiver receiver = new MCCIMT000100UV01Receiver(); SenderReceiverHelper helper = new SenderReceiverHelper(); String receiverDeviceId = "1.16.17.19"; receiver = helper.CreateReceiver(receiverDeviceId); assertEquals(receiver.getDevice().getId().get(0).getRoot(), "1.16.17.19"); }
@Test public void CreateReceiverDeviceIdNull() { MCCIMT000100UV01Receiver receiver = new MCCIMT000100UV01Receiver(); SenderReceiverHelper helper = new SenderReceiverHelper(); String receiverDeviceId = "1.16.17.19"; receiver = helper.CreateReceiver(); assertEquals(receiver.getDevice().getId().get(0).getNullFlavor().get(0), "NA"); }