Esempio n. 1
0
 @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);
 }
Esempio n. 2
0
 @Test
 public void testFrom() throws Exception {
   byte[] bytes = typeConverter.from(12147483648L, 11, -1, true);
   assertArrayEquals("12147483648".getBytes(StandardCharsets.UTF_8), bytes);
 }