assertThat(getInst().findProject("projectName"), nullValue());
}
@Test
public void findProjectByProjectNameSecurity() {
ProjectService inst = spy(getInst());
doReturn(project).when(hudson).getItemByFullName("projectName", AbstractProject.class);
@SuppressWarnings("unchecked")
Collection<String> names = Mockito.mock(Collection.class);
when(names.contains("projectName")).thenReturn(true);
when(inst.getProjectNames()).thenReturn(names);
AbstractProject<?, ?> result = getInst().findProject("projectName");
assertThat(result, equalTo(project));
Mockito.verify(securityService).checkPermission(project, Item.READ);