config.persist(device);
ApplicationEntity ae = config.findApplicationEntity("TEST-AET1");
assertFalse(ae.isAssociationInitiator());
assertTrue(ae.isAssociationAcceptor());
assertTrue(ae.getConnections().get(0).isServer());
TransferCapability echoSCP = ae.getTransferCapabilityFor(
UID.VerificationSOPClass, TransferCapability.Role.SCP);
assertNotNull(echoSCP);
assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian }, echoSCP.getTransferSyntaxes());
TransferCapability ctSCP = ae.getTransferCapabilityFor(
UID.CTImageStorage, TransferCapability.Role.SCP);
assertNotNull(ctSCP);
assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian, UID.ExplicitVRLittleEndian },
sort(ctSCP.getTransferSyntaxes()));
assertNull(ctSCP.getStorageOptions());
TransferCapability findSCP = ae.getTransferCapabilityFor(
UID.StudyRootQueryRetrieveInformationModelFIND, TransferCapability.Role.SCP);
assertNotNull(findSCP);
assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian }, findSCP.getTransferSyntaxes());
assertEquals(EnumSet.of(QueryOption.RELATIONAL), findSCP.getQueryOptions());
assertEquals(1, config.listDeviceInfos(deviceInfo("Test-Device-1")).length);
try {
config.persist(createDevice("Test-Device-1", "TEST-AET1"));
fail("ConfigurationAlreadyExistsException expected");
} catch (ConfigurationAlreadyExistsException e) {}