### Question:
OAuth2FetcherConfig { public boolean isViewerAccessTokensEnabled() { return this.viewerAccessTokensEnabled; } @Inject  OAuth2FetcherConfig(final GadgetOAuth2TokenStore tokenStore,
          @Named("shindig.oauth2.viewer-access-tokens-enabled")
          final boolean viewerAccessTokensEnabled); OAuth2Store getOAuth2Store(); GadgetOAuth2TokenStore getTokenStore(); boolean isViewerAccessTokensEnabled(); static final String OAUTH2_STATE_CRYPTER; }### Answer:
@Test public void testOAuth2FetcherConfig_1() throws Exception { final GadgetOAuth2TokenStore tokenStore = new GadgetOAuth2TokenStore( EasyMock.createNiceMock(OAuth2Store.class), EasyMock.createNiceMock(GadgetSpecFactory.class)); final boolean viewerAccessTokensEnabled = true; final OAuth2FetcherConfig result = new OAuth2FetcherConfig(tokenStore, viewerAccessTokensEnabled); Assert.assertNotNull(result); Assert.assertEquals(true, result.isViewerAccessTokensEnabled()); }
@Test public void testIsViewerAccessTokensEnabled_1() throws Exception { final OAuth2FetcherConfig fixture = new OAuth2FetcherConfig(new GadgetOAuth2TokenStore( EasyMock.createNiceMock(OAuth2Store.class), EasyMock.createNiceMock(GadgetSpecFactory.class)), true); final boolean result = fixture.isViewerAccessTokensEnabled(); Assert.assertEquals(true, result); }
@Test public void testIsViewerAccessTokensEnabled_2() throws Exception { final OAuth2FetcherConfig fixture = new OAuth2FetcherConfig(new GadgetOAuth2TokenStore( EasyMock.createNiceMock(OAuth2Store.class), EasyMock.createNiceMock(GadgetSpecFactory.class)), false); final boolean result = fixture.isViewerAccessTokensEnabled(); Assert.assertEquals(false, result); }