### Question:
RequestContext extends CoreContext { public Map<String, Object> clientContext() { return clientContext; } @Stability.Internal  RequestContext(CoreContext ctx, final Request<? extends Response> request); @Stability.Volatile long dispatchLatency(); @Stability.Internal RequestContext dispatchLatency(long dispatchLatency); @Stability.Volatile long encodeLatency(); @Stability.Internal RequestContext encodeLatency(long encodeLatency); @Stability.Volatile String lastChannelId(); @Stability.Internal RequestContext lastChannelId(final String lastChannelId); @Stability.Volatile long serverLatency(); @Stability.Internal RequestContext serverLatency(long serverLatency); @Stability.Internal RequestContext logicallyComplete(); int retryAttempts(); Set<RetryReason> retryReasons(); Duration lastRetryDuration(); long logicallyCompletedAt(); long logicalRequestLatency(); @Stability.Internal RequestContext incrementRetryAttempts(final Duration lastRetryDuration, final RetryReason reason); HostAndPort lastDispatchedTo(); @Stability.Internal NodeIdentifier lastDispatchedToNode(); @Stability.Internal RequestContext lastDispatchedTo(final HostAndPort lastDispatchedTo); @Stability.Internal RequestContext lastDispatchedToNode(final NodeIdentifier lastDispatchedToNode); HostAndPort lastDispatchedFrom(); @Stability.Internal RequestContext lastDispatchedFrom(final HostAndPort lastDispatchedFrom); Map<String, Object> clientContext(); @Stability.Internal RequestContext clientContext(final Map<String, Object> clientContext); Request<? extends Response> request(); @Override void injectExportableParams(final Map<String, Object> input); @Stability.Uncommitted RequestContext cancel();  }### Answer:
@Test void customPayloadCanBeAttached() { Request<?> request = mock(Request.class); Core core = mock(Core.class); RequestContext ctx = new RequestContext(new CoreContext(core, 1, null, mock(Authenticator.class)), request); assertNull(ctx.clientContext()); Map<String, Object> payload = new HashMap<>(); payload.put("foo", true); ctx.clientContext(payload); assertEquals(payload, ctx.clientContext()); }