@Test
public void failsOnInvalidBirthday() throws Exception {

    try {
        validBirthdayAdapter().fromJson("{\n"
              + "  \"day\": 1,\n"
              + "  \"nope\": 3\n"
              + '}');
    } catch (IOException ex) {
        assertThat(ex.getMessage()).isEqualTo("birthday should contain 'year', 'month' and/or 'day', found $nope");
    }
}