@Test
public void testUploadToFossologyWithEmptyId() throws Exception {

    AttachmentContent attachment = mock(AttachmentContent.class);
    when(attachment.getId()).thenReturn(null);
    when(attachment.getFilename()).thenReturn("fileName");
    String clearingTeam = "cl";
    final InputStream inputStream = mock(InputStream.class);
    final long uploadId = fossologyUploader.uploadToFossology(inputStream, attachment, clearingTeam);
    verify(sshConnector, never()).runInFossologyViaSsh(anyString(), any(InputStream.class), any(OutputStream.class));
    assertThat(uploadId, is((long) -1));
}