@Test(expected = IllegalArgumentException.class) public void shouldNotAllowVisitationIfNoVisitor() throws Exception { altimaModel.accept(null); }
@Test public void shouldAllowVisitation() throws Exception { ItemVisitor visitor = Mockito.mock(ItemVisitor.class); altimaModel.accept(visitor); Mockito.verify(visitor).visit(altimaModel); }