@Test
public void testClose() {

    behavior.close();
    final InternalCommand<ShardBackendInfo> internalCommand =
            clientActorProbe.expectMsgClass(InternalCommand.class);
    internalCommand.execute(behavior);
    try {
        behavior.createLocalHistory();
        Assert.fail("Behavior is closed and shouldn't allow to create new history.");
    } catch (final IllegalStateException e) {
        //ok
    }
}