@Test
public void shouldThrowExceptionOnSubscriptionDeleteFailure() throws IOException {

    server.expectRequestTo("http://example.com/subscriptions/123", "DELETE")
            .andRespondWith(404, ContentType.APPLICATION_JSON, "{\n" +
                    "  \"type\": \"http://httpstatus.es/404\",\n" +
                    "  \"title\": \"Not Found\",\n" +
                    "  \"status\": 404,\n" +
                    "  \"detail\": \"Subscription not found.\"\n" +
                    "}").setup();
    expectedException.expect(IOProblem.class);
    expectedException.expectMessage("Problem [http://httpstatus.es/404] with status [404]: [Not Found] [Subscription not found.]");
    client.deleteSubscription("123");
    server.verify();
}