OffsetService { public void updateOffset(final int item, final String offset) { String node = OffsetNode.getItemNode(item); jobNodeStorage.createJobNodeIfNeeded(node); jobNodeStorage.updateJobNode(node, offset); } OffsetService(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration); void updateOffset(final int item, final String offset); Map<Integer, String> getOffsets(final List<Integer> items);  }
@Test public void assertUpdateOffset() { offsetService.updateOffset(0, "offset0"); verify(jobNodeStorage).createJobNodeIfNeeded("offset/0"); verify(jobNodeStorage).updateJobNode("offset/0", "offset0"); }