package com.pgf.mqspring.component.impl; import static org.junit.jupiter.api.Assertions.*; 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 com.pgf.mqspring.component.TelegramInfoComponent; class CharacterCodeConverterComponentImplTest10 { @Mock TelegramInfoComponent telegramInfoComponent; @InjectMocks CharacterCodeConverterComponentImpl target; @BeforeEach void beforeEacn() { MockitoAnnotations.openMocks(this); } @Test void decodeHexStringData01() { byte[] bytes = {}; assertEquals("", target.decodeHexStringData(bytes)); } @Test void decodeHexStringData02() { byte[] bytes = { -1 }; assertEquals(Integer.toHexString(-1 + 256).toUpperCase(), target.decodeHexStringData(bytes)); } @Test void decodeHexStringData03() { byte[] bytes = { 16 }; assertEquals(Integer.toHexString(16).toUpperCase(), target.decodeHexStringData(bytes)); } @Test void decodeHexStringData04() { byte[] bytes = { 15 }; assertEquals("0" + Integer.toHexString(15).toUpperCase(), target.decodeHexStringData(bytes)); } @Test void decodeHexStringData05() { byte[] bytes = { -1, 16, 15 }; assertEquals(Integer.toHexString(-1 + 256).toUpperCase() + Integer.toHexString(16).toUpperCase() + "0" + Integer.toHexString(15).toUpperCase(), target.decodeHexStringData(bytes)); } }