@Test(expected = ActionException.class) public void deserialize_resultClassNotKnown_throws() throws ActionException { UnsecuredRestAction action = new UnsecuredRestAction(HttpMethod.GET, ""); Response response = mock(Response.class); given(response.getStatusCode()).willReturn(200); deserializer.deserialize(action, response); }
@Override public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException { if (isSuccessStatusCode(response)) { return getDeserializedResponse(action, response); } else { throw new ActionException(response.getStatusText()); } }
DefaultResponseDeserializer implements ResponseDeserializer { @Override public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException { if (isSuccessStatusCode(response)) { return getDeserializedResponse(action, response); } else { throw new ActionException(response.getStatusText()); } } }
DefaultResponseDeserializer implements ResponseDeserializer { @Override public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException { if (isSuccessStatusCode(response)) { return getDeserializedResponse(action, response); } else { throw new ActionException(response.getStatusText()); } } @Inject protected  DefaultResponseDeserializer(Provider<Set<Serialization>> serializationsProvider); }
DefaultResponseDeserializer implements ResponseDeserializer { @Override public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException { if (isSuccessStatusCode(response)) { return getDeserializedResponse(action, response); } else { throw new ActionException(response.getStatusText()); } } @Inject protected  DefaultResponseDeserializer(Provider<Set<Serialization>> serializationsProvider); @Override R deserialize(A action, Response response); }
DefaultResponseDeserializer implements ResponseDeserializer { @Override public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException { if (isSuccessStatusCode(response)) { return getDeserializedResponse(action, response); } else { throw new ActionException(response.getStatusText()); } } @Inject protected  DefaultResponseDeserializer(Provider<Set<Serialization>> serializationsProvider); @Override R deserialize(A action, Response response);  }