repository.deployArtifact(releaseId, kJar2, kPom);
MBeanUtils.invoke(mbeanName, "scanNow", new Object[] {}, new String[] {} );
// create a ksesion and check it works as expected
KieSession ksession2 = kieContainer.newKieSession("KSession1");
checkKSession(ksession2, "rule2", "rule3");
MBeanUtils.invoke(mbeanName, "shutdown", new Object[] {}, new String[] {} );
Assert.assertEquals( InternalKieScanner.Status.SHUTDOWN.toString(), MBeanUtils.getAttribute( mbeanName, "Status") );