@Test public void testFromOverflow() throws Exception { expectedEx.expect(TypeConverterException.class); expectedEx.expectMessage("Field to small for value"); byte[] bytes = typeConverter.from(12147483648L, 4, -1, true); }
@Test public void testFrom() throws Exception { byte[] bytes = typeConverter.from(12147483648L, 11, -1, true); assertArrayEquals("12147483648".getBytes(StandardCharsets.UTF_8), bytes); }