### Question:
ObjectToArrayProcessorOptions extends ProcessorOptions { public ObjectToArrayProcessorOptions() { super(); } ObjectToArrayProcessorOptions();  ObjectToArrayProcessorOptions(ObjectToArrayProcessorOptions other);  ObjectToArrayProcessorOptions(ProcessorOptions other);  ObjectToArrayProcessorOptions(JsonObject json); JsonArray getFields(); ObjectToArrayProcessorOptions setFields(JsonArray fields); @Override String getName(); @Override ObjectToArrayProcessorOptions setName(String name); @Override String getType(); @Override ObjectToArrayProcessorOptions setType(String type); @Override Integer getInstances(); @Override ObjectToArrayProcessorOptions setInstances(Integer instances); @Override JsonObject toJson(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final JsonArray DEFAULT_FIELD; }### Answer:
@Test @DisplayName("Validate Object to array options") void testObjectToArrayProcessorOptions() { new ObjectToArrayProcessorOptionsConverter(); String badStr = "{\"name\": 10, \"type\": 20, \"fields\": false}"; String optStr = "{\"instances\":1, \"name\":\"name\", \"type\": \"type\", \"fields\":[\"field1\",\"field2\"]}"; ProcessorOptions optPump = new ProcessorOptions(new JsonObject(optStr)); ObjectToArrayProcessorOptions optNull = new ObjectToArrayProcessorOptions() .setName(null) .setType(null) .setFields(null); ObjectToArrayProcessorOptions optObj = new ObjectToArrayProcessorOptions() .setName("name") .setType("type") .setFields(arr().add("field1").add("field2")); JsonObject optJson = new JsonObject(optStr); assertThat(new ObjectToArrayProcessorOptions(new JsonObject(badStr))).isEqualTo(new ObjectToArrayProcessorOptions()); assertThat(optNull.toJson()).isEqualTo(obj().put("instances", 1)); assertThat(optObj).isEqualTo(optObj); assertThat(optObj).isNotEqualTo(optNull); assertThat(optObj).isEqualTo(new ObjectToArrayProcessorOptions(optJson)); assertThat(optObj).isEqualTo(new ObjectToArrayProcessorOptions(optObj)); assertThat(optObj.toString()).isEqualTo(new ObjectToArrayProcessorOptions(optJson).toString()); assertThat(optObj.hashCode()).isEqualTo(new ObjectToArrayProcessorOptions(optJson).hashCode()); assertThat(optObj).isNotEqualTo(null); assertThat(optObj).isNotEqualTo(new Object()); assertThat(optObj.toJson()).isEqualTo(optJson); assertThat(optPump) .isEqualToComparingOnlyGivenFields(new ObjectToArrayProcessorOptions(optPump), "name", "type"); }