@Test
public void testSuccessRequestOnContext() throws Throwable {

  runOnOtherThread(new Runnable() {
    @Override
    public void run() {
      try {
        ContextHolder.attach(context);
        final Requester requester = new DecoratingRequester();
        final String expected = randomUUID().toString();
        final String name = randomUUID().toString();
        final String actual = requester.request(new TestInvocation<>(new RequestMethod<String>() {
          @Override
          public String getName() {
            return name;
          }
          @Override
          protected String runInternal(final List<Object> parameters) throws Exception {
            return expected;
          }
        }));
        assertEquals(expected, actual);
      } catch (Exception e) {
        throw new IllegalStateException(e);
      } finally {
        ContextHolder.remove();
      }
    }
  });
}