333435363738394041
public static class GetNotFound implements Answer<Object> { @Override public Object answer(InvocationOnMock invocation) throws Throwable { String key = (String)invocation.getArguments()[0]; Get cb = (Get) invocation.getArguments()[1]; cb.notFound(key); return null; }
525354555657585960
} @Override public Object answer(InvocationOnMock invocation) throws Throwable { String key = (String)invocation.getArguments()[0]; Get cb = (Get) invocation.getArguments()[1]; cb.found(key, rev, data); return null; }
3031323334353637383940
public DbHelper(Db db) { this.db = db; } public void init() { db.get(MASTER_KEY, new Get() { @Override public void error(String key, KeezException e) { throw new RuntimeException("Error while loading masterkey " + key, e); }