System.out.println( Thread.currentThread().getStackTrace()[1].getMethodName() );
String randomFact = "" + random.nextLong();
ksession.insert(randomFact);
// Retrieve and verify fact handle collections
GetFactHandlesCommand command = new GetFactHandlesCommand(false);
Object result = commandService.execute(command);
verifyThatCollectionContains1FactHandleWithThisFact(randomFact, result);
FactHandle factHandle = (FactHandle) ((Collection<FactHandle>) result).toArray()[0];
command = new GetFactHandlesCommand(false);
result = commandService.execute(command);
verifyThatCollectionContains1FactHandleWithThisFact(randomFact, result);
FactHandle connectedFactHandle = (FactHandle) ((Collection<FactHandle>) result).toArray()[0];
command = new GetFactHandlesCommand(true);
result = commandService.execute(command);
verifyThatCollectionContains1FactHandleWithThisFact(randomFact, result);
FactHandle disconnectedFactHandle = (FactHandle) ((Collection<FactHandle>) result).toArray()[0];
// Test fact handle collections