- Mockito.verifyZeroInteractions(mockBabelClient, mockBabelArtifactConverter);
- }
-
- @Test
- public void testErrorCreatingBabelClient() throws Exception {
- when(mockClientFactory.create(Mockito.any())).thenThrow(new BabelServiceClientException(new Exception()));
-
- INotificationData data = getNotificationDataWithToscaCsarFile();
- IArtifactInfo artifactInfo = data.getServiceArtifacts().get(0);
- setupValidDownloadCsarMocks(data, artifactInfo, new ArtifactTestUtils());
- doNothing().when(mockNotificationPublisher).publishDeployFailure(mockDistributionClient, data, artifactInfo);
-
- assertThat(downloadManager.downloadArtifacts(data, data.getServiceArtifacts(), null, null), is(false));
-
- Mockito.verify(mockDistributionClient).download(artifactInfo);
- Mockito.verify(mockNotificationPublisher).publishDownloadSuccess(mockDistributionClient, data, artifactInfo);
- Mockito.verify(mockNotificationPublisher).publishDeployFailure(mockDistributionClient, data, artifactInfo);
-
- Mockito.verifyZeroInteractions(mockBabelArtifactConverter);