### Question:
Version { public String getEndRange() { if (!isRange()) return getVersion(); String[] parts = version.split(",", 2); return parts[1].trim(); } Version(final String version); boolean isRange(); String getVersion(); String getStartRange(); String getEndRange(); boolean minorVersionSupport(); boolean majorVersionSupport(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetEndRange() throws Exception { Version v = new Version("1,2"); Assert.assertNotNull(v.getEndRange()); Assert.assertEquals("2", v.getEndRange()); Version v1 = new Version("1.2"); Assert.assertNotNull(v1.getEndRange()); }