@Test
public void testSetAuthLevelIfSpecified_unspecified() throws Exception {

  annotationConfig.setAuthLevelIfSpecified(AuthLevel.UNSPECIFIED);
  assertEquals(AuthLevel.NONE, config.getAuthLevel());
  Mockito.when(apiClassConfig.getAuthLevel()).thenReturn(AuthLevel.REQUIRED);
  assertEquals(AuthLevel.REQUIRED, config.getAuthLevel());
  annotationConfig.setAuthLevelIfSpecified(AuthLevel.REQUIRED);
  assertEquals(AuthLevel.REQUIRED, config.getAuthLevel());
  annotationConfig.setAuthLevelIfSpecified(AuthLevel.UNSPECIFIED);
  assertEquals(AuthLevel.REQUIRED, config.getAuthLevel());
}