File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/test/java/org/apache/pulsar/manager/service Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ public class BrokersServiceImplTest {
48
48
@ MockBean
49
49
private PulsarAdminService pulsarAdminService ;
50
50
51
+ @ MockBean
52
+ private EnvironmentCacheService environmentCacheService ;
53
+
51
54
@ Autowired
52
55
private BrokersService brokersService ;
53
56
@@ -71,6 +74,9 @@ public void brokersServiceTest() throws Exception{
71
74
Mockito .when (brokers .getActiveBrokers ("standalone" ))
72
75
.thenReturn (Arrays .asList ("broker-1:8080" ));
73
76
77
+ Mockito .when (environmentCacheService .getEnvironment ("http://localhost:8080" ))
78
+ .thenReturn ("env" );
79
+
74
80
Map <String , Object > result = brokersService .getBrokersList (
75
81
1 , 1 , "standalone" , "http://localhost:8080" );
76
82
Assert .assertEquals (1 , result .get ("total" ));
You can’t perform that action at this time.
0 commit comments