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