// 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
assertTrue( factHandle == connectedFactHandle );
assertTrue( ! (factHandle == disconnectedFactHandle) );
}