WalPosition implements IncrementalPosition { @Override public JsonElement toJson() { return GSON.toJsonTree(logSequenceNumber.asLong()); }  @Override int compareTo(final Position position); @Override JsonElement toJson();  }
@Test public void assertToJson() { WalPosition walPosition = new WalPosition(LogSequenceNumber.valueOf(100L)); assertThat(walPosition.toJson().toString(), is("100")); }