### Question:
OSGiVersion implements Comparable<OSGiVersion> { static String[] split(final String version) { if (!version.contains(".")) { return new String[]{version}; } List<String> result = new ArrayList<String>(4); String remaining = version; for (int i; ; ) { i = remaining.indexOf("."); if (i == -1) { result.add(remaining); break; } if (i == 0) { result.add(""); } else { result.add(remaining.substring(0, i)); } remaining = remaining.substring(i + 1); } for (int i = result.size() - 1; i > -1; i--) { if (result.get(i).trim().length() == 0) { result.remove(i); } else { break; } } return result.toArray(new String[result.size()]); } @SuppressWarnings("unused")  OSGiVersion();  OSGiVersion(String version); static boolean isValid(String version); int getMajor(); void setMajor(int major); Integer getMinorIfDefined(); int getMinor(); void setMinor(Integer minor); int getMicro(); Integer getMicroIfDefined(); void setMicro(Integer micro); String getQualifier(); void setQualifier(String qualifier); @Override int compareTo(OSGiVersion o); @Override String toString();  }### Answer:
@Test(dataProvider = "testSplit") public void testSplit(String input) { assertEquals(OSGiVersion.split(input), input.split("\\.")); }