public boolean isAtLeast(final KsqlVersion version) {
    if (versionType == version.versionType) {
      return isAtLeastVersion(this, version.majorVersion, version.minorVersion);
    }

    if (versionType == VersionType.KSQLDB_STANDALONE) {
      final KsqlVersion otherStandalone = versionMapping.get(version);
      return otherStandalone != null
          && isAtLeastVersion(
              this,
              otherStandalone.majorVersion,
              otherStandalone.minorVersion
          );
    }

    final KsqlVersion standalone = versionMapping.get(this);
    return standalone != null
        && isAtLeastVersion(standalone, version.majorVersion, version.minorVersion);
  }
@Test
  public void shouldOnlyCompareMajorMinorVersionsInIsAtLeast() {
    assertThat(new KsqlVersion("5.1.0").isAtLeast(new KsqlVersion("5.1.1")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("5.1.0")), is(true));

    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("5.2.0")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("5.2.1")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("5.2.2")), is(false));
    assertThat(new KsqlVersion("5.2.1").isAtLeast(new KsqlVersion("5.1.0")), is(true));
    assertThat(new KsqlVersion("5.2.1").isAtLeast(new KsqlVersion("5.1.1")), is(true));
    assertThat(new KsqlVersion("5.2.1").isAtLeast(new KsqlVersion("5.1.2")), is(true));

    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.0.0")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.0.1")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.0.2")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.1.0")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.1.1")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.1.2")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.2.0")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.2.1")), is(false));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("6.2.2")), is(false));

    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.0.0")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.0.1")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.0.2")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.1.0")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.1.1")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.1.2")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.2.0")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.2.1")), is(true));
    assertThat(new KsqlVersion("5.1.1").isAtLeast(new KsqlVersion("4.2.2")), is(true));
  }