### Question:
OAuth2DeviceIdentityProvider { public String getIdentity(String clientId, String clientSecret, File refreshTokenFile, String requesterIdentity) throws IOException, InterruptedException { ThreadContext.push("getIdentity"); Marker m = new Marker("getIdentity"); try { String refreshToken = getString(refreshTokenFile, "refresh token", true); String accessToken; if (refreshToken == null) { accessToken = acquire(httpClient, clientId, clientSecret, refreshTokenFile, requesterIdentity); } else { accessToken = refresh(httpClient, clientId, clientSecret, refreshToken); } return getIdentityByToken(httpClient, accessToken); } finally { m.close(); ThreadContext.pop(); } }  String getIdentity(String clientId, String clientSecret, File refreshTokenFile, String requesterIdentity); String getIdentity(File clientIdFile, File clientSecretFile, File refreshTokenFile, String requesterIdentity);  }### Answer:
@Test public void testIdentity() throws IOException, InterruptedException { ThreadContext.push("testIdentity"); try { if (!ContextChecker.runNow(logger)) { return; } Map<String, String> env = ContextChecker.check(new String[] {HCC_CLIENT_ID, HCC_CLIENT_SECRET}, true); String clientId = env.get(HCC_CLIENT_ID); String clientSecret = env.get(HCC_CLIENT_SECRET); File refreshTokenFile = new File(System.getProperty("user.home"), ".dz/test/" + getClass().getSimpleName()); String identity = provider.getIdentity(clientId, clientSecret, refreshTokenFile, getClass().getSimpleName()); logger.info("identity: " + identity); } finally { ThreadContext.pop(); } }