@Test
public void ignoresInvalidGeoCode() throws Exception {

    JsonAdapter<GeoCode> adapter = geoCodeAdapter(GeoCode.class);
    assertThat(adapter.fromJson("{\"accuracy\":12,\"latitude\":null,\"longitude\":null}")).isNull();
    assertThat(adapter.fromJson("{\"latitude\":34.2,\"longitude\":null}")).isNull();
    assertThat(adapter.fromJson("{\"latitude\":null,\"longitude\":24.45}")).isNull();
    assertThat(adapter.fromJson("{\"unknown\":null,\"longitude\":24.45}")).isNull();
    assertThat(adapter.fromJson("{}")).isNull();
}