@Test void GetIdentityToken_ReturnsCorrectToken() throws IngestionServiceException, IngestionClientException { assertEquals(AUTH_TOKEN, resourceManager.getIdentityToken()); }
String getIdentityToken() throws IngestionServiceException, IngestionClientException { if (identityToken == null) { refreshIngestionAuthToken(); try { authTokenLock.readLock().lock(); if (identityToken == null) { throw new IngestionServiceException("Unable to get Identity token"); } } finally { authTokenLock.readLock().unlock(); } } return identityToken; }
ResourceManager implements Closeable { String getIdentityToken() throws IngestionServiceException, IngestionClientException { if (identityToken == null) { refreshIngestionAuthToken(); try { authTokenLock.readLock().lock(); if (identityToken == null) { throw new IngestionServiceException("Unable to get Identity token"); } } finally { authTokenLock.readLock().unlock(); } } return identityToken; } }
ResourceManager implements Closeable { String getIdentityToken() throws IngestionServiceException, IngestionClientException { if (identityToken == null) { refreshIngestionAuthToken(); try { authTokenLock.readLock().lock(); if (identityToken == null) { throw new IngestionServiceException("Unable to get Identity token"); } } finally { authTokenLock.readLock().unlock(); } } return identityToken; } ResourceManager(Client client, long defaultRefreshTime, long refreshTimeOnFailure);   ResourceManager(Client client); }
ResourceManager implements Closeable { String getIdentityToken() throws IngestionServiceException, IngestionClientException { if (identityToken == null) { refreshIngestionAuthToken(); try { authTokenLock.readLock().lock(); if (identityToken == null) { throw new IngestionServiceException("Unable to get Identity token"); } } finally { authTokenLock.readLock().unlock(); } } return identityToken; } ResourceManager(Client client, long defaultRefreshTime, long refreshTimeOnFailure);   ResourceManager(Client client); @Override void close(); }
ResourceManager implements Closeable { String getIdentityToken() throws IngestionServiceException, IngestionClientException { if (identityToken == null) { refreshIngestionAuthToken(); try { authTokenLock.readLock().lock(); if (identityToken == null) { throw new IngestionServiceException("Unable to get Identity token"); } } finally { authTokenLock.readLock().unlock(); } } return identityToken; } ResourceManager(Client client, long defaultRefreshTime, long refreshTimeOnFailure);   ResourceManager(Client client); @Override void close();  }