Eliminate the yellow code prompt
@@ -67,12 +67,12 @@ public final class NacosConfigurationTest extends AbstractConfigurationTest {
};
try (MockedStatic<NacosFactory> nacosFactoryMockedStatic = Mockito.mockStatic(NacosFactory.class)) {
final ConfigService configServiceMock = Mockito.mock(ConfigService.class);
- ArgumentCaptor argument = ArgumentCaptor.forClass(Properties.class);
+ ArgumentCaptor<Properties> argument = ArgumentCaptor.forClass(Properties.class);
nacosFactoryMockedStatic
- .when(() -> NacosFactory.createConfigService((Properties) argument.capture()))
+ .when(() -> NacosFactory.createConfigService(argument.capture()))
.thenReturn(configServiceMock);
load(NacosConfiguration.class, inlinedProperties);
- assertTrue(((Properties) argument.getValue()).containsKey(PropertyKeyConst.ENDPOINT));
+ assertTrue(argument.getValue().containsKey(PropertyKeyConst.ENDPOINT));
}
ConfigService configService = (ConfigService) getContext().getBean("nacosConfigService");
assertNotNull(configService);
