### Question:
GenericURLStreamHandler extends URLStreamHandler { @Override protected int getDefaultPort() { return defaultPort; } GenericURLStreamHandler(Class<? extends URLConnection> urlConnectionClass, int defaultPort);  GenericURLStreamHandler(Class<? extends URLConnection> urlConnectionClass);   }### Answer:
@Test public void testGetDefaultPort() { Assert.assertEquals("Default should be -1", new GenericURLStreamHandler(m_testClass).getDefaultPort(), -1); Assert.assertEquals("Default should be 42", new GenericURLStreamHandler(m_testClass, m_defaultPort).getDefaultPort(), m_defaultPort); }