From 7887d2628d6795cd8e49d95c7a993b3c2bec2366 Mon Sep 17 00:00:00 2001 From: aherbst-broad Date: Fri, 19 Apr 2024 11:18:00 -0400 Subject: [PATCH] Wire up a mock amalgamted service --- .../landingzone/azure/LandingZoneApiDispatchTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/src/test/java/bio/terra/workspace/amalgam/landingzone/azure/LandingZoneApiDispatchTest.java b/service/src/test/java/bio/terra/workspace/amalgam/landingzone/azure/LandingZoneApiDispatchTest.java index b430411abb..6d0764b311 100644 --- a/service/src/test/java/bio/terra/workspace/amalgam/landingzone/azure/LandingZoneApiDispatchTest.java +++ b/service/src/test/java/bio/terra/workspace/amalgam/landingzone/azure/LandingZoneApiDispatchTest.java @@ -61,14 +61,17 @@ public class LandingZoneApiDispatchTest extends BaseAzureSpringBootUnitTest { new SpendProfileId(UUID.randomUUID().toString()); private LandingZoneApiDispatch landingZoneApiDispatch; - @Mock private LandingZoneService landingZoneService; @Mock private FeatureConfiguration featureConfiguration; @Mock private WorkspaceService workspaceService; + @Mock private LandingZoneService landingZoneService; @Mock private LandingZoneServiceFactory landingZoneServiceFactory; @BeforeEach void setupLandingZoneTests() { when(featureConfiguration.isAzureEnabled()).thenReturn(true); + var amalgamted = new AmalgamatedLandingZoneService(landingZoneService); + when(landingZoneServiceFactory.getLandingZoneService()).thenReturn(amalgamted); + landingZoneApiDispatch = new LandingZoneApiDispatch( featureConfiguration, mockSamService(), landingZoneServiceFactory);