### Question:
BlobUtils { public static byte[] blob2Bytes(Blob blob) { if (blob == null) { return null; } try { return blob.getBytes((long) 1, (int) blob.length()); } catch (Exception e) { throw new ShouldNeverHappenException(e); } } private  BlobUtils(); static Blob string2blob(String str); static String blob2string(Blob blob); static Blob bytes2Blob(byte[] bytes); static byte[] blob2Bytes(Blob blob);  }### Answer:
@Test void blob2Bytes() throws UnsupportedEncodingException, SQLException { assertNull(BlobUtils.blob2Bytes(null)); byte[] bs = "xxaaadd".getBytes(Constants.DEFAULT_CHARSET_NAME); assertThat(BlobUtils.blob2Bytes(new SerialBlob(bs))).isEqualTo( bs); }