@Test
    public void testIsInvalid_noToAddress_unauthenticated() throws Exception
    {
        // Setup test fixture.
        final Packet stanza = new Message();
        final LocalClientSession session = mock(LocalClientSession.class, withSettings().strictness(Strictness.LENIENT));
        when(session.getStatus()).thenReturn(Session.Status.CONNECTED); // 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 without a 'to' address (instructing the server to handle it directly on behalf of the entity
that sent it) on a session that has not completed resource binding.

The server must handle a stanza without a 'to' address on behalf of the entity that sent it (per RFC 6120,
section 10.3), therefor the method under test should accept the stanza.
xmppserver/src/test/java/org/jivesoftware/openfire/SessionPacketRouterTest.java