OAuth2AuthFeature implements Feature { @Override public boolean configure(final FeatureContext context) { context.register(OAuth2ScopeDynamicFeature.class); context.register(new WWWChallengeExceptionMapper.Binder()); return true; }  @Override boolean configure(final FeatureContext context);  }
@Test public void testBinder() throws Exception { OAuth2AuthFeature feature = new OAuth2AuthFeature(); FeatureContext mockContext = mock(FeatureContext.class); boolean result = feature.configure(mockContext); assertTrue(result); verify(mockContext, times(1)) .register(OAuth2ScopeDynamicFeature.class); verify(mockContext, times(1)) .register(any(WWWChallengeExceptionMapper.Binder.class)); verifyNoMoreInteractions(mockContext); }