public Tasks findByType(Class<? extends Task> type) {
        Tasks matchedTasks = new Tasks();
        for (Task t : this) {
            if (type.isInstance(t)) {
                matchedTasks.add(t);
            }
        }

        return matchedTasks;
    }
@Test
    public void shouldReturnEmptyTasks() throws Exception {
        AntTask antTask1 = new AntTask();
        FetchTask fetchArtifact = new FetchTask();
        Tasks tasks = new Tasks(antTask1, fetchArtifact);
        Tasks finds = tasks.findByType(NantTask.class);
        assertThat(finds.size(), is(0));
    }