@Test public void testParseInvalid() throws Exception { assertEquals(Pollers.parse("0"), Pollers.DEFAULT_PERIODS); assertEquals(Pollers.parse("-1"), Pollers.DEFAULT_PERIODS); assertEquals(Pollers.parse("1L"), Pollers.DEFAULT_PERIODS); assertEquals(Pollers.parse("100,-1"), Pollers.DEFAULT_PERIODS); assertEquals(Pollers.parse("100,0"), Pollers.DEFAULT_PERIODS); }
@Test public void testParseMultiple() throws Exception { long[] expected = {60000L, 10000L, 2000L}; assertEquals(Pollers.parse("60000,10000,2000"), expected); }