### Question:
DefaultHubMessageFilterImpl implements HubMessageFilter { @Override public boolean acceptFromProtocol(HubSession session, ProtocolMessage msg) { String placeId = msg.getPlaceId(); if(placeId != null && placeId.equals(session.getActivePlace())) { return true; } logger.warn("Rejecting protocol message with incorrect place header [{}] from [{}]", placeId, msg.getSource()); return false; } @Inject  DefaultHubMessageFilterImpl(
      @Named(ADMIN_ADDRESS_PROP) Predicate<Address> adminAddress,
      @Named(ADMIN_ONLY_MESSAGES_PROP) Predicate<String> adminOnlyMessage,
      PlatformBusService platformBusService); @Override boolean acceptFromHub(HubSession session, PlatformMessage msg); @Override boolean acceptFromHub(HubSession session, ProtocolMessage msg); @Override boolean acceptFromPlatform(HubSession session, PlatformMessage msg); @Override boolean acceptFromProtocol(HubSession session, ProtocolMessage msg); static final String ADMIN_ADDRESS_PROP; static final String ADMIN_ONLY_MESSAGES_PROP; }### Answer:
@Test public void testProtocolLeavesState() { State state = clientSession.getState(); ProtocolMessage msg = createProtocolMessage(); authorizer.acceptFromProtocol(clientSession, msg); assertSame(state, clientSession.getState()); }