    @Test
    public void testFilterFinishedTorrentsToNotify() {

        Server server = new Server("test", "localhost", 9091);
        server.setLastUpdateDate(100L);
        Collection<Torrent> torrents = ImmutableSet.of(
                new Torrent.Builder().doneDate(-1L).build(),
                new Torrent.Builder().doneDate(100L).build(),
                new Torrent.Builder().doneDate(555L).build(),
                new Torrent.Builder().doneDate(873L).build(),
                new Torrent.Builder().doneDate(0L).build()
        );

        Collection<Torrent> filteredTorrents = detector.filterFinishedTorrentsToNotify(torrents, server);

        assertThat(filteredTorrents, hasSize(2));
        assertThat(filteredTorrents, hasItem(withDoneDate(555L)));
        assertThat(filteredTorrents, hasItem(withDoneDate(873L)));
    }