@SuppressWarnings("unchecked")
Collection<String> names = Mockito.mock(Collection.class);
when(names.contains("projectName")).thenReturn(true);
when(inst.getProjectNames()).thenReturn(names);
assertThat(inst.projectExists("projectName"), is(true));
}
}