ServiceResponse<KieContainerResource> reply = client.getContainerInfo("kie1");
Assert.assertEquals(ServiceResponse.ResponseType.SUCCESS, reply.getType());
ServiceResponse<KieScannerResource> si = client.getScannerInfo("kie1");
Assert.assertEquals( ResponseType.SUCCESS, si.getType() );
KieScannerResource info = si.getResult();
Assert.assertEquals( KieScannerStatus.DISPOSED, info.getStatus() );
si = client.updateScanner("kie1", new KieScannerResource(KieScannerStatus.STARTED, 10000l));
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.STARTED, info.getStatus() );
si = client.getScannerInfo("kie1");
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.STARTED, info.getStatus() );
si = client.updateScanner("kie1", new KieScannerResource(KieScannerStatus.STOPPED, 10000l));
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.STOPPED, info.getStatus() );
si = client.getScannerInfo("kie1");
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.STOPPED, info.getStatus() );
si = client.updateScanner("kie1", new KieScannerResource(KieScannerStatus.DISPOSED, 10000l));
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.DISPOSED, info.getStatus() );
si = client.getScannerInfo("kie1");
Assert.assertEquals( si.getMsg(), ResponseType.SUCCESS, si.getType() );
info = si.getResult();
Assert.assertEquals( KieScannerStatus.DISPOSED, info.getStatus() );
}