### Question:
DefaultHubMessageFilterImpl implements HubMessageFilter { @Override public boolean acceptFromPlatform(HubSession session, PlatformMessage msg) { String placeId = msg.getPlaceId(); if(StringUtils.isEmpty(placeId)) { return true; } if(adminAddress.apply(msg.getSource())) { return true; } if (adminOnlyMessage.apply(msg.getMessageType())) { logger.warn("Rejecting admin only message from non-admin client: [{}]", msg.getMessageType()); if (msg.isRequest()) { MessageBody body = AuthzUtil.createUnauthorizedEvent(); PlatformMessage rsp = PlatformMessage.buildResponse(msg,body).create(); platformBusService.placeMessageOnPlatformBus(rsp); } return false; } if(placeId.equals(session.getActivePlace())) { return true; } logger.warn("Rejecting 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 testAribtraryPlatformMessageLeavesState() { State state = clientSession.getState(); PlatformMessage msg = createPlatformMessage(MessageBody.pong()); authorizer.acceptFromPlatform(clientSession, msg); assertSame(state, clientSession.getState()); }