@Override
  public boolean lessThanOrEqualTo(final OffsetVector other) {
    final List<Long> offsetsOther = other.getDenseRepresentation();
    // Special case that says that a vectors is "less than or equal" to an uninitialized vector
    if (offsetsOther.isEmpty()) {
      return true;
    }
    Preconditions.checkState(offsetsOther.size() == offsets.get().size());
    int partition = 0;
    for (Long offset : offsets.get()) {
      final long offsetOther = offsetsOther.get(partition);
      if (offset >= 0 && offsetOther >= 0) {
        if (offset > offsetOther) {
          return false;
        }
      }
      partition++;
    }
    return true;
  }
@Test
  public void shouldBeLessThanOrEqual() {
    // Given:
    PushOffsetVector pushOffsetVector1 = new PushOffsetVector(ImmutableList.of(2L, 3L, 4L));

    // Then:
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(2L, 3L, 4L))), is(true));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(3L, 3L, 4L))), is(true));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(3L, 4L, 4L))), is(true));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(3L, 4L, 5L))), is(true));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(1L, 3L, 4L))), is(false));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(1L, 2L, 4L))), is(false));
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of(1L, 2L, 3L))), is(false));
    // Special case
    assertThat(pushOffsetVector1.lessThanOrEqualTo(
        new PushOffsetVector(ImmutableList.of())), is(true));
  }