Location { public boolean hasCoordinate() { return coordinate != null; } @JsonCreator  Location(
		@JsonProperty("city") String city,
		@JsonProperty("zipCode") String zipCode,
		@JsonProperty("coordinate") Coordinate coordinate,
		@JsonProperty("countryCode") String countryCode);  Location(
		@JsonProperty("city") String city,
		@JsonProperty("zipCode") String zipCode,
		@JsonProperty("coordinate") Coordinate coordinate); boolean hasCity(); String getCity(); boolean hasZipCode(); String getZipCode(); boolean hasCoordinate(); Coordinate getCoordinate(); String getCountryCode(); @Override boolean equals(Object o); @Override int hashCode(); static final String UNKNOWN; }
@Test public void testHasCoordinate() { Location location = new Location(null, null, erlangen); Assert.assertFalse(location.hasCity()); Assert.assertFalse(location.hasZipCode()); Assert.assertTrue(location.hasCoordinate()); }