TimeSeriesVersions { public static int check(int version) { if (version < 0) { throw new IllegalArgumentException("Bad version " + version); } return version; } private  TimeSeriesVersions(); static int check(int version);  }
@Test public void test() { assertEquals(3, TimeSeriesVersions.check(3)); }
@Test(expected = IllegalArgumentException.class) public void testException() { TimeSeriesVersions.check(-1); }