* @throws Exception if some problem inside
*/
@Test(expected = IllegalStateException.class)
public void throwsWhenResourceIsAbsent() throws Exception {
final Limit limit = Mockito.mock(Limit.class);
final Throttled throttled = new Throttled(limit, 23);
Mockito.when(limit.json()).thenReturn(
Json.createObjectBuilder().add("absent", "absentValue").build()
);
throttled.json();
}