From 7c6c32cb87b6161f181ef9435cf04c68202ad8b7 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Fri, 31 Jul 2020 15:04:39 -0400 Subject: [PATCH] Mock property source name --- .../encrypt/EnvironmentDecryptApplicationInitializerTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/encrypt/EnvironmentDecryptApplicationInitializerTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/encrypt/EnvironmentDecryptApplicationInitializerTests.java index 5136c67b..1c20e894 100644 --- a/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/encrypt/EnvironmentDecryptApplicationInitializerTests.java +++ b/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/encrypt/EnvironmentDecryptApplicationInitializerTests.java @@ -187,6 +187,7 @@ public class EnvironmentDecryptApplicationInitializerTests { Collections.singletonMap("key", "{cipher}value2")); CompositePropertySource cps = mock(CompositePropertySource.class); + when(cps.getName()).thenReturn("mockpropertysource"); when(cps.getPropertyNames()).thenReturn(devProfile.getPropertyNames()); when(cps.getPropertySources()) .thenReturn(Arrays.asList(devProfile, defaultProfile));