package com.pgf.mqspring.service.impl; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.jms.core.JmsTemplate; import org.springframework.test.context.junit.jupiter.SpringExtension; @ExtendWith(SpringExtension.class) class MqReceiveServiceImplTest03 { @Mock JmsTemplate jmsTemplate; @InjectMocks MqReceiveServiceImpl mqReceiveService; @BeforeEach public void beforeEacn() throws IOException { mqReceiveService = new MqReceiveServiceImpl(jmsTemplate); } @Test void getQueue01() throws InterruptedException { mqReceiveService.setQueue("test"); assertEquals("test", mqReceiveService.getQueue()); } }