### Question:
DeviceUtil { private DeviceUtil() { } private  DeviceUtil(); static Device createServerDevice(
      String applicationEntityName,
      Integer dicomPort,
      DicomServiceRegistry serviceRegistry,
      TransferCapability transferCapability); static Device createClientDevice(
      ApplicationEntity applicationEntity, Connection connection);  }### Answer:
@Test public void testDeviceUtil() throws Exception { DicomServiceRegistry registry = new DicomServiceRegistry(); TransferCapability transferCapability = new TransferCapability( null , "*", TransferCapability.Role.SCP, "*"); Device device = DeviceUtil.createServerDevice("server", 11111, registry, transferCapability); assertThat(device.getDeviceName()).isEqualTo("dicom-to-dicomweb-adapter-server"); List<Connection> connections = device.listConnections(); assertThat(connections).hasSize(1); assertThat(connections.get(0).getPort()).isEqualTo(11111); Collection<ApplicationEntity> applicationEntities = device.getApplicationEntities(); assertThat(applicationEntities).hasSize(1); ApplicationEntity applicationEntity = applicationEntities.iterator().next(); assertThat(applicationEntity.getAETitle()).isEqualTo("server"); Collection<TransferCapability> transferCapabilities = applicationEntity.getTransferCapabilities(); assertThat(transferCapabilities).hasSize(1); TransferCapability gotTransferCapability = transferCapabilities.iterator().next(); assertThat(gotTransferCapability.getSopClass()).isEqualTo("*"); assertThat(gotTransferCapability.getRole()).isEqualTo(TransferCapability.Role.SCP); }