StateHistory { public boolean isEmpty() { return stateHistory.isEmpty(); } StateHistory(
      @NonNull final String sourceName,
      @NonNull final Repository<Collection<S>> repository,
      @NonNull final MysqlSourceMetrics metrics);  StateHistory(
      @NonNull final String sourceName,
      @Min(1) final int capacity,
      @NonNull final Repository<Collection<S>> repository,
      @NonNull final MysqlSourceMetrics metrics); void add(final S state); S removeLast(); S removeLast(int count); void clear(); boolean isEmpty(); int size();  }
@Test public void testEmptyHistory() throws Exception { MysqlSourceState state = mock(MysqlSourceState.class); TestRepository repository = new TestRepository(); StateHistory<MysqlSourceState> history = new StateHistory<>(SOURCE_NAME, 2, repository, metrics); assertTrue(history.isEmpty()); repository = new TestRepository(state); history = new StateHistory<>(SOURCE_NAME, 2, repository, metrics); assertFalse(history.isEmpty()); }