code: @Override
    public int compare(String expected, String actual) {
      String[] vals1 = expected.split("\\.");
      String[] vals2 = actual.split("\\.");
  
      int i = 0;
      while (i < vals1.length && i < vals2.length && vals1[i].equals(vals2[i])) {
        i++;
      }
  
      if (i < vals1.length && i < vals2.length) {
        int diff = Integer.valueOf(vals1[i]).compareTo(Integer.valueOf(vals2[i]));
        return Integer.signum(diff);
      } else {
        return Integer.signum(vals1.length - vals2.length);
      }
    }
docs: compare the expected version with the actual version.
  
  Checkout: http://stackoverflow.com/questions/6701948/efficient-way-to-compare-version-strings-in-java
  
  @param expected the version that is obtained from @Document annotation
  @param actual the version that is read from the .json file
  @return a negative integer, zero, or a positive integer as the first argument is less
  than, equal to, or greater than the second.