NpmTokenManager extends BearerTokenManager { public boolean logout() { return super.deleteToken(); } @Inject  NpmTokenManager(final ApiKeyStore apiKeyStore, final SecurityHelper securityHelper); String login(final String username, final String password); boolean logout();  }
@Test public void deleteKeyOnLogout() throws Exception { when(apiKeyStore.getApiKey(any(), any())).thenReturn(TOKEN.toCharArray()); assertTrue(underTest.logout()); verify(apiKeyStore).deleteApiKey(NpmToken.NAME, principalCollection); }