assertEquals(4567, options.getRedeployScanPeriod());
}
@Test
public void testToJson() {
DeploymentOptions options = new DeploymentOptions();
JsonObject config = new JsonObject().put("foo", "bar");
Random rand = new Random();
boolean worker = rand.nextBoolean();
boolean multiThreaded = rand.nextBoolean();
String isolationGroup = TestUtils.randomAlphaString(100);
boolean ha = rand.nextBoolean();
long gracePeriod = 521445;
long scanPeriod = 234234;
List<String> cp = Arrays.asList("foo", "bar");
options.setConfig(config);
options.setWorker(worker);
options.setMultiThreaded(multiThreaded);
options.setIsolationGroup(isolationGroup);
options.setHa(ha);
options.setExtraClasspath(cp);
options.setRedeploy(true);
options.setRedeployGracePeriod(gracePeriod);
options.setRedeployScanPeriod(scanPeriod);
JsonObject json = options.toJson();
DeploymentOptions copy = new DeploymentOptions(json);
assertEquals(worker, copy.isWorker());
assertEquals(multiThreaded, copy.isMultiThreaded());
assertEquals(isolationGroup, copy.getIsolationGroup());
assertEquals("bar", copy.getConfig().getString("foo"));
assertEquals(ha, copy.isHa());
assertEquals(cp, copy.getExtraClasspath());
assertEquals(gracePeriod, copy.getRedeployGracePeriod());
assertEquals(scanPeriod, copy.getRedeployScanPeriod());
}