use of org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo in project milo by eclipse.
the class OpcUaServerConfigTest method testCopy.
@Test
public void testCopy() throws IOException {
DefaultTrustListManager trustListManager = new DefaultTrustListManager(Files.createTempDir());
ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
OpcUaServerConfig original = OpcUaServerConfig.builder().setCertificateManager(new DefaultCertificateManager()).setTrustListManager(trustListManager).setCertificateValidator(new DefaultServerCertificateValidator(trustListManager)).setIdentityValidator(AnonymousIdentityValidator.INSTANCE).setBuildInfo(new BuildInfo("a", "b", "c", "d", "e", DateTime.MIN_VALUE)).setLimits(new OpcUaServerConfigLimits() {
}).setScheduledExecutorService(scheduledExecutorService).build();
OpcUaServerConfig copy = OpcUaServerConfig.copy(original).build();
assertEquals(copy.getIdentityValidator(), original.getIdentityValidator());
assertEquals(copy.getBuildInfo(), original.getBuildInfo());
assertEquals(copy.getLimits(), original.getLimits());
assertEquals(copy.getScheduledExecutorService(), original.getScheduledExecutorService());
}
Aggregations