Memo { public static MemoText text(String text) { return new MemoText(text); }  static MemoNone none(); static MemoText text(String text); static MemoId id(long id); static MemoHash hash(byte[] bytes); static MemoHash hash(String hexString); static MemoReturnHash returnHash(byte[] bytes); static MemoReturnHash returnHash(String hexString); static Memo fromXdr(kin.base.xdr.Memo memo); abstract boolean equals(Object o);  }
@Test public void testMemoTextTooLong() { try { Memo.text("12345678901234567890123456789"); fail(); } catch (RuntimeException exception) { assertTrue(exception.getMessage().contains("text must be <= 28 bytes.")); } }
@Test public void testMemoTextTooLongUtf8() { try { Memo.text("价值交易的开源协议!!"); fail(); } catch (RuntimeException exception) { assertTrue(exception.getMessage().contains("text must be <= 28 bytes.")); } }