HttpUrlConnectionFactory.mockedConnection = null;
assertTrue(discovery.isValidAuthority(testingURL));
}</BUG>
public void testIsValidAuthorityPositiveInList() throws MalformedURLException {
final Discovery discovery = new Discovery();
<BUG>final URL endpointFull = new URL("https://login.windows.net/common/oauth2/authorize");
Assert.assertTrue(discovery.isValidAuthority(endpointFull));
final URL endpointInstanceRight = new URL("https://login.windows.net/something/something");
Assert.assertTrue(discovery.isValidAuthority(endpointInstanceRight));
final URL endpointInstanceOnly = new URL("https://login.windows.net");
Assert.assertFalse(discovery.isValidAuthority(endpointInstanceOnly));
}</BUG>
public void testIsValidAuthorityNegative() throws IOException {

HttpUrlConnectionFactory.mockedConnection = null;
}
}
public void testIsValidAuthorityPositiveInList() throws MalformedURLException {
