fix unit tests after changing the lookup way

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-04-12 10:03:19 +02:00
parent c4fd082098
commit 0b5286299c

View File

@@ -313,11 +313,9 @@ public class AmqpMessageHandlerServiceTest {
// mock
final LocalArtifact localArtifactMock = mock(LocalArtifact.class);
final Action actionMock = mock(Action.class);
final DbArtifact dbArtifactMock = mock(DbArtifact.class);
when(artifactManagementMock.findFirstLocalArtifactsBySHA1(anyString())).thenReturn(localArtifactMock);
when(controllerManagementMock.getActionForDownloadByTargetAndSoftwareModule(anyObject(), anyObject()))
.thenReturn(actionMock);
when(controllerManagementMock.hasTargetArtifactAssigned(anyObject(), anyObject())).thenReturn(true);
when(artifactManagementMock.loadLocalArtifactBinary(localArtifactMock)).thenReturn(dbArtifactMock);
when(dbArtifactMock.getArtifactId()).thenReturn("artifactId");
when(dbArtifactMock.getSize()).thenReturn(1L);