@Test
public void testRequestProducerAddingTokenCanBeCreated() {

    RequestBuilder builder = mock(RequestBuilder.class);
    RequestBuilder builderResult = mock(RequestBuilder.class);
    @SuppressWarnings("unchecked")
    Consumer<RequestBuilder> wrappedProducer = mock(Consumer.class);
    when(builder.header(HttpConstants.HEADER_AUTHORIZATION, AUTH_HEADER_VALUE))
            .thenReturn(builderResult);
    AccessToken accessToken = new AccessToken(TOKEN);
    Consumer<RequestBuilder> producer = accessToken.tokenProducer(wrappedProducer);
    producer.accept(builder);
    verify(builder).header(HttpConstants.HEADER_AUTHORIZATION, AUTH_HEADER_VALUE);
    verify(wrappedProducer).accept(builderResult);
}