@Test
    public void testJARMagicBytes() throws Exception
    {
        // Setup test fixture.
        try (final InputStream inputStream = getClass().getClassLoader().getResourceAsStream("hello.jar")) {
            assert inputStream != null;
            try (final BufferedInputStream in = new BufferedInputStream(inputStream)) {

                // Execute system under test
                final boolean result = PluginManager.validMagicNumbers( in );

                // Verify results.
                assertTrue( result );
            }
        }
    }
Tests that verify the functionality of {@link PluginManager}

@author Guus der Kinderen, guus.der.kinderen@gmail.com
xmppserver/src/test/java/org/jivesoftware/openfire/container/PluginManagerTest.java