From 17f55470f36030cbeb830fa68b21bbaf66278357 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 14 Jan 2015 12:15:08 -0800 Subject: [PATCH] Use BDD Mockito methods --- .../discovery/DiscoveryCompositeHealthIndicatorTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/springframework/cloud/client/discovery/DiscoveryCompositeHealthIndicatorTests.java b/src/test/java/org/springframework/cloud/client/discovery/DiscoveryCompositeHealthIndicatorTests.java index d84d2cfc..7d0cd5b6 100644 --- a/src/test/java/org/springframework/cloud/client/discovery/DiscoveryCompositeHealthIndicatorTests.java +++ b/src/test/java/org/springframework/cloud/client/discovery/DiscoveryCompositeHealthIndicatorTests.java @@ -33,8 +33,8 @@ import com.google.common.collect.Lists; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; /** * @author Spencer Gibb @@ -57,8 +57,8 @@ public class DiscoveryCompositeHealthIndicatorTests { @Bean public DiscoveryClient discoveryClient() { DiscoveryClient mock = mock(DiscoveryClient.class); - when(mock.description()).thenReturn("TestDiscoveryClient"); - when(mock.getServices()).thenReturn(Lists.newArrayList("TestService1")); + given(mock.description()).willReturn("TestDiscoveryClient"); + given(mock.getServices()).willReturn(Lists.newArrayList("TestService1")); return mock; }