EventDAO { public void createEvent(Event event) { Long id = _createEvent(event); event.setId(id); }  @SqlQuery("select events.* from events join follow where follow.follower_id = :uid and events.user_id = follow.followee_id order by date limit 100") abstract List<Event> homepageEvents(@Bind("uid") Long userId); void createEvent(Event event);  }
@Test public void testCreateEvent() throws Exception { dao.createEvent(evt); assertThat(evt.getId()).isEqualTo(1l); }