@@ -0,0 +1,1352 @@
+package com.opera.core.systems;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.junit.Test;%0A%0Aimport com.opera.core.systems.util.VersionUtil;%0A%0Apublic class VersionUtilsTest extends TestCase %7B%0A%0A%09private final String version = %222.0%22;%0A%09private final String%5B%5D biggerVersions = %7B%222.0.0%22, %222.0.1%22, %222.1%22, %222.1.0%22, %223.0%22, %223.0.1%22%7D;%0A%09private final String%5B%5D smallerVersions = %7B%221.0.0%22, %221.0.1%22, %221.1%22, %221.1.0%22, %221.0%22, %221.9.9%22%7D;%0A%0A%09@Test%0A%09public void testShouldSupportSmallerThan() %7B%0A%09%09traverseVersions(biggerVersions, 1, %22%3E%22);%0A%09%7D%0A%0A%09@Test%0A%09public void testShouldSupportBiggerThan() %7B%0A%09%09traverseVersions(smallerVersions, -1, %22%3C%22);%0A%09%7D%0A%0A%09@Test%0A%09public void testShouldSupportEquals() %7B%0A%0A%09%09for(int i = 0; i %3C biggerVersions.length; ++i) %7B%0A%09%09%09int result = VersionUtil.compare(biggerVersions%5Bi%5D, biggerVersions%5Bi%5D);%0A%09%09%09assertTrue(%22Expected equals on %22 + biggerVersions%5Bi%5D  , result == 0 );%0A%09%09%7D%0A%0A%09%09for(int i = 0; i %3C smallerVersions.length; ++i) %7B%0A%09%09%09int result = VersionUtil.compare(smallerVersions%5Bi%5D, smallerVersions%5Bi%5D);%0A%09%09%09assertTrue(%22Expected equals on %22 + smallerVersions%5Bi%5D  , result == 0 );%0A%09%09%7D%0A%09%7D%0A%0A%09private void traverseVersions(String%5B%5D arr, int expected, String sign) %7B%0A%09%09for(int i = 0; i %3C arr.length; ++i) %7B%0A%09%09%09int result = VersionUtil.compare(arr%5Bi%5D, version);%0A%09%09%09assertTrue(%22Expected %22 + arr%5Bi%5D + %22 %22 + sign + %22 %22 + version, result == expected );%0A%09%09%7D%0A%09%7D%0A%0A%0A%7D%0A

Add tests for Version Utils comparison