@Test public void deserializesCreditCardWithOutIdAndWithAppropriateMontshAndYears() throws Exception { CreditCard creditCard = mapper.readValue(REFERENCE, CreditCard.class); assertThat(creditCard.getId(), is(nullValue())); assertThat(creditCard.getExpirationDate(), is(new LocalDate(2013, 11, 1))); assertThat(creditCard.getNumber(), is(notNullValue())); }