@Test
    public void testIsInvalid_addressedAtDomain_authenticated() throws Exception
    {
        // Setup test fixture.
        final Packet stanza = new Message();
        stanza.setTo(XMPPServer.getInstance().getServerInfo().getXMPPDomain());
        final LocalClientSession session = mock(LocalClientSession.class, withSettings().strictness(Strictness.LENIENT));
        when(session.getStatus()).thenReturn(Session.Status.AUTHENTICATED); // Openfire sets 'AUTHENTICATED' only after resource binding has been done.

        // Execute system under test.
        final boolean result = SessionPacketRouter.isInvalidStanzaSentPriorToResourceBinding(stanza, session);

        // Verify results.
        assertFalse(result);
    }
Tests the implementation of {@link SessionPacketRouter#isInvalidStanzaSentPriorToResourceBinding(Packet, ClientSession)}
by sending a stanza that is addressed to the domain of the server on a session that has completed resource
binding.

As the session has a resource bound, any stanza should be accepted by the method under test.
xmppserver/src/test/java/org/jivesoftware/openfire/SessionPacketRouterTest.java