@Test(description = "This method tests the successful execution of init method")
public void testInit() throws NoSuchFieldException, IllegalAccessException {

    properties = new Properties();
    properties.setProperty("TokenValidationEndpointUrl", "test");
    properties.setProperty("Username", "admin");
    properties.setProperty("Password", "admin");
    properties.setProperty("IsRemote", "true");
    properties.setProperty("MaxConnectionsPerHost", "100");
    properties.setProperty("MaxTotalConnections", "1000");
    Assert.assertNull(oAuthAuthenticator.getProperty("test"),
            "OAuth authenticator is returning the properties that were never set");
    oAuthAuthenticator.setProperties(properties);
    oAuthAuthenticator.init();
    Field tokenValidator = OAuthAuthenticator.class.getDeclaredField("tokenValidator");
    tokenValidator.setAccessible(true);
    Assert.assertNotNull(tokenValidator.get(oAuthAuthenticator), "OauthAuthenticator initialization failed");
    Assert.assertEquals(oAuthAuthenticator.getName(), "OAuth", "Name of the OauthAuthenticator does not match");
}