CoinfloorException extends HttpStatusExceptionSupport { public int getErrorCode() { return errorCode; } CoinfloorException(
      @JsonProperty("error_code") int errorCode, @JsonProperty("error_msg") String reason); int getErrorCode();  }
@Test public void unmarshalTest() throws IOException { JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); ObjectMapper mapper = factory.createObjectMapper(); InputStream is = getClass() .getResourceAsStream( "/org/knowm/xchange/coinfloor/dto/trade/example-order-entry-reject.json"); CoinfloorException exception = mapper.readValue(is, CoinfloorException.class); assertThat(exception.getMessage()).startsWith("You have insufficient funds."); assertThat(exception.getErrorCode()).isEqualTo(4); }