// create a ksesion and check it works as expected
KieSession ksession = kieContainer.newKieSession("KSession1");
checkKSession(ksession, "rule1", "rule2");
KieRepositoryScannerImpl scanner = (KieRepositoryScannerImpl) ks.newKieScanner(kieContainer);
KieScannerMBeanImpl mBean = (KieScannerMBeanImpl) scanner.getMBean();
ObjectName mbeanName = mBean.getMBeanName();
// we want to check that the mbean is register in the server and exposing the correct attribute values
// so we fetch the attributes from the server
Assert.assertEquals( releaseId.toExternalForm(), MBeanUtils.getAttribute( mbeanName, "ScannerReleaseId") );