### Question:
FileSinkOptions extends FlushableSinkOptions { public FileSinkOptions() { super(); } FileSinkOptions();  FileSinkOptions(JsonObject json);  FileSinkOptions(FileSinkOptions other);  FileSinkOptions(SinkOptions other); String getPath(); FileSinkOptions setPath(String path); String getFile(); FileSinkOptions setFile(String file); Format getFormat(); FileSinkOptions setFormat(Format format); Mode getMode(); FileSinkOptions setMode(Mode mode); @Override Integer getBatchSize(); @Override FileSinkOptions setBatchSize(Integer batchSize); @Override String getName(); @Override FileSinkOptions setName(String name); @Override String getType(); @Override FileSinkOptions setType(String type); @Override JsonObject toJson(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String DEFAULT_FILE; static final Format DEFAULT_FORMAT; static final String DEFAULT_PATH; static final Mode DEFAULT_MODE; }### Answer:
@Test @DisplayName("Validate File sink options") void testFileSinkOptions() { new FileSinkOptionsConverter(); String badStr = "{\"name\": 10, \"type\": 20, \"batchSize\": \"1000\", \"mode\": 1000, \"format\": 100, \"path\": true, \"file\": true}"; String optStr = "{\"name\":\"name\", \"type\": \"type\", \"batchSize\":100, \"mode\": \"append\", \"format\": \"yaml\", \"path\":\"/test\",\"file\":\"test\"}"; SinkOptions optPump = new SinkOptions(new JsonObject(optStr)); FileSinkOptions optNull = new FileSinkOptions() .setName(null) .setType(null) .setBatchSize(null) .setMode(null) .setFormat(null) .setPath(null) .setFile(null); FileSinkOptions optObj = new FileSinkOptions() .setName("name") .setType("type") .setBatchSize(100) .setMode(FileSinkOptions.Mode.append) .setFormat(FileSinkOptions.Format.yaml) .setPath("/test") .setFile("test"); JsonObject optJson = new JsonObject(optStr); assertThat(new FileSinkOptions(new JsonObject(badStr))).isEqualTo(new FileSinkOptions()); assertThat(optNull.toJson()).isEqualTo(obj()); assertThat(optObj).isEqualTo(optObj); assertThat(optObj).isNotEqualTo(optNull); assertThat(optObj).isEqualTo(new FileSinkOptions(optJson)); assertThat(optObj).isEqualTo(new FileSinkOptions(optObj)); assertThat(optObj.toString()).isEqualTo(new FileSinkOptions(optJson).toString()); assertThat(optObj.hashCode()).isEqualTo(new FileSinkOptions(optJson).hashCode()); assertThat(optObj).isNotEqualTo(null); assertThat(optObj).isNotEqualTo(new Object()); assertThat(optObj.toJson()).isEqualTo(optJson); assertThat(optPump) .isEqualToComparingOnlyGivenFields(new FileSinkOptions(optPump), "name", "type"); }