GuestAuthenticator implements Authenticator { Request resign(Request request, GuestAuthToken token) { final Request.Builder builder = request.newBuilder(); GuestAuthInterceptor.addAuthHeaders(builder, token); return builder.build(); } GuestAuthenticator(GuestSessionProvider guestSessionProvider); @Override Request authenticate(Route route, Response response);  }
@Test public void testResign() { final Request newRequest = authenticator.resign(request, mockAuthToken); assertEquals(TEST_HEADER_AUTHORIZATION_2, newRequest.header(OAuthConstants.HEADER_AUTHORIZATION)); assertEquals(TEST_GUEST_TOKEN_2, newRequest.header(OAuthConstants.HEADER_GUEST_TOKEN)); }