@Test
public void testFailRequestOnNoContext() throws Exception {

  final Requester requester = new DecoratingRequester();
  final Exception expected = new IllegalStateException();
  final String name = randomUUID().toString();
  final TestInvocation<String> invocation = new TestInvocation<>(new RequestMethod<String>() {
    @Override
    public String getName() {
      return name;
    }
    @Override
    protected String runInternal(final List<Object> parameters) throws Exception {
      throw expected;
    }
  });
  try {
    requester.request(invocation);
    fail("Should throw exception");
  } catch (Exception actual) {
    assertEquals(expected, actual);
  }
}