### Question:
RefineQuery { public void setQuery(String query) { this.query = query; }  String getQuery(); void setQuery(String query); Optional<Integer> getLimit(); void setLimit(int limit); Optional<String> getType(); void setType(String type); Optional<String> getType_strict(); void setType_strict(String type_strict); Map<String, Object> getProperties(); void setProperties(Map<String, Object> properties); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void deserializationIsCorrect_withOptionalFields() throws Exception { RefineQuery expected = new RefineQuery(); expected.setQuery("foo"); RefineQuery actual = MAPPER.readValue(fixture("fixtures/refineQueryOptionalFields.json"), RefineQuery.class); assertThat(actual, is(expected)); }
@Test public void deserializationIsCorrect_withMultipleRefineQueries() throws Exception { RefineQuery foo = new RefineQuery(); foo.setQuery("foo"); RefineQuery bar = new RefineQuery(); bar.setQuery("bar"); RefineQueries expected = new RefineQueries(); expected.put("q0", foo); expected.put("q1", bar); RefineQueries actual = MAPPER.readValue(fixture("fixtures/refineQueries.json"), RefineQueries.class); assertThat(actual, is(expected)); }