package com.pgf.mqspring.component.impl; import static org.junit.jupiter.api.Assertions.*; import java.io.UnsupportedEncodingException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.springframework.test.util.ReflectionTestUtils; import com.pgf.mqspring.component.TelegramInfoComponent; class CharacterCodeConverterComponentImplTest03 { @Mock TelegramInfoComponent telegramInfoComponent; @InjectMocks CharacterCodeConverterComponentImpl target; @BeforeEach void beforeEacn() { MockitoAnnotations.openMocks(this); } @Test void encodeEbcdic01() throws UnsupportedEncodingException { assertArrayEquals("テストデータ".getBytes("Cp930"), ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "encodeEbcdic", "テストデータ")); } }