@Test(expected = NullPointerException.class) public void testInvokingTimerWithNullMethodName() throws Throwable { try { helper.invokeTimerFor(TestAggregator.class, null); } catch (RuntimeException e) { assertThat(e.getClass().getName(), is(RuntimeException.class.getName())); throw e.getCause(); } }
@Test(expected = NullPointerException.class) public void testInvokingNotExistentTimer() throws Throwable { try { helper.invokeTimerFor(TestAggregator.class, "blkjhsdgfksdyufgks"); } catch (RuntimeException e) { assertThat(e.getClass().getName(), is(RuntimeException.class.getName())); throw e.getCause(); } }