@Test
public void testNoRetryOnAccessControlException() throws Exception {

  RetryPolicy policy = mock(RetryPolicy.class);
  RetryPolicy realPolicy = RetryPolicies.failoverOnNetworkException(5);
  setupMockPolicy(policy, realPolicy);
  UnreliableInterface unreliable = (UnreliableInterface) RetryProxy.create(
      UnreliableInterface.class, unreliableImpl, policy);
  try {
    unreliable.failsWithAccessControlExceptionEightTimes();
    fail("Should fail");
  } catch (AccessControlException e) {
    // expected
    verify(policy, times(1)).shouldRetry(any(Exception.class), anyInt(),
        anyInt(), anyBoolean());
    assertEquals(RetryDecision.FAIL, caughtRetryAction.action);
  }
}