CountingItemResourceLocator implements ResourceLocator<T> { @Override public void onRead(T item, ResourceContext context) throws Exception { context.incrementIndex(); }  @Override void onOpen(ResourceContext context); @Override void onWrite(T item, ResourceContext context); @Override void onRead(T item, ResourceContext context); void setMaxItemCount(int maxItemCount); void setRowsToSkip(int rowsToSkip);  }
@Test public void testOnUpdate() throws Exception { resourceLocator.onRead(null, new ResourceContext(new ExecutionContext(), "foo")); }