3940414243444546
@Autowired private TrackDao dao; @Test public void getByExistingIdReturnsOneTrack() { Track track = dao.getById(1); assertThat(track.getName(), is("The Saint")); }
4546474849505152
assertThat(track.getName(), is("The Saint")); } @Test public void getByNotExistingIdReturnsNull() { Track track = dao.getById(9001); assertThat(track, is(nullValue())); }
5253545556575859
} @Test public void getByExistingGidReturnsOneTrack() { UUID gid = UUID.fromString("70c4bd53-f3ef-354f-97a9-7ed76915087a"); Track track = dao.getByGid(gid); assertThat(track.getName(), is("The Saint")); }
5960616263646566
} @Test public void getByNotExistingGidReturnsNull() { UUID gid = UUID.fromString("b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"); Track track = dao.getByGid(gid); assertThat(track, is(nullValue())); }
6667686970717273
} @Test public void getByExistingGidReturnsOneTrackThatHasNoRedirectedGids() { UUID gid = UUID.fromString("8f64df73-562c-4145-a9db-9736a3f04c27"); Track track = dao.getByGid(gid); assertThat(track.getName(), is("The Saint")); }