@Test
    public void testDetectVersionHigh() throws Exception
    {
        // Setup test fixture.
        final XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
        parser.setInput(new StringReader("<stream version='" + (Session.MAJOR_VERSION+10) + "." + (Session.MINOR_VERSION+11) + "'/>"));
        int v;
        do {
            v = parser.next();
        } while (v != XmlPullParser.START_TAG);

        // Execute system under test.
        final int[] result = Session.detectVersion(parser);

        // Verify results.
        assertEquals(Session.MAJOR_VERSION, result[0]);
        assertEquals(Session.MINOR_VERSION, result[1]);
    }
Unit tests that verify the implementation of {@link Session}.

@author Guus der Kinderen, guus@goodbytes.nl
xmppserver/src/test/java/org/jivesoftware/openfire/session/SessionTest.java