package com.pgf.mqspring.component.impl; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.springframework.test.util.ReflectionTestUtils; import com.pgf.mqspring.component.MqSpringMessageSourceComponent; import com.pgf.mqspring.model.TelegramInfoModel; class TelegramInfoComponentImplTest02 { @Mock MqSpringMessageSourceComponent messageSource; TelegramInfoComponentImpl target; @BeforeEach void beforeEach() throws IOException { MockitoAnnotations.openMocks(this); target = new TelegramInfoComponentImpl( messageSource, "", ""); } @Test void getTelegramInfoMap01() { Map> telegramInfoMap = new HashMap<>(); telegramInfoMap.put("key", null); ReflectionTestUtils.setField(target, "telegramInfoMap", telegramInfoMap); assertEquals(telegramInfoMap, target.getTelegramInfoMap()); } }