@Test public void hasAttributes() throws Exception { Ticket ticket = new Ticket(); Assert.assertEquals(Boolean.FALSE, ticket.hasAttributes()); ticket.setAttributes(new HashMap<>()); Assert.assertEquals(Boolean.FALSE, ticket.hasAttributes()); ticket.addAttribute("user", "ulf"); Assert.assertEquals(Boolean.TRUE, ticket.hasAttributes()); }