ExportersState { public long getPosition(final String exporterId) { this.exporterId.wrapString(exporterId); return getPosition(); } ExportersState(final ZeebeDb<ZbColumnFamilies> zeebeDb, final DbContext dbContext); void setPosition(final String exporterId, final long position); long getPosition(final String exporterId); long getPosition(final DirectBuffer exporterId); void visitPositions(final BiConsumer<String, Long> consumer); long getLowestPosition(); void removePosition(final String exporter); boolean hasExporters(); static final long VALUE_NOT_FOUND; }
@Test public void shouldReturnUnknownPositionForUnknownExporter() { final String id = "exporter"; final long position = state.getPosition(id); assertThat(position).isEqualTo(-1); }