AddStringSanskritChange implements SanskritChange { @Override public void accept(SanskritChangeVisitor visitor) { visitor.setString(key, value); } AddStringSanskritChange(String key, String value); @Override void accept(SanskritChangeVisitor visitor);  }
@Test public void callsSetString() { AddStringSanskritChange change = new AddStringSanskritChange("key", "abc"); change.accept(visitor); verify(visitor).setString("key", "abc"); verifyNoMoreInteractions(visitor); }