public void testRemoveConnection() throws Exception { connectionContext.setSecurityContext(new StubSecurityContext()); authBroker.removeConnection(connectionContext, connectionInfo, new Throwable()); assertEquals( "removeConnection should clear ConnectionContext.", null, connectionContext.getSecurityContext()); assertEquals( "Incorrect number of calls to underlying broker were made.", 1, receiveBroker.removeConnectionData.size()); }