MsgObject { @Override public String toString() { StringBuilder str = new StringBuilder(); getGroupValueHandler(getClass()).appendToString(this, str); return str.toString(); }  @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); static String toString(Object obj); static boolean equals(Object o1, Object o2); static int hashCode(Object obj);  }
@Test public void testFieldOrderToString() { assertEquals("FieldOrder [i1=0, i4=0, i2=0, i5=0, i3=0, i6=0]", new FieldOrder().toString()); }
@Test public void testBasicToString() { assertEquals("Basic [int32=123, string=Hello]", new Basic(123, "Hello").toString()); }
@Test public void testArrayMsgToString() { assertEquals("ArrayMsg [strings=null, ints=null, basics=null]", new ArrayMsg(null, null, null).toString()); assertEquals("ArrayMsg [strings=[], ints=[], basics=[]]", new ArrayMsg(new String[0], new int[0], new Basic[0]).toString()); assertEquals("ArrayMsg [strings=[a], ints=[1], basics=[Basic [int32=123, string=Hello]]]", new ArrayMsg(new String[]{"a"}, new int[]{1}, new Basic[]{new Basic(123, "Hello")}).toString()); assertEquals("ArrayMsg [strings=[a, b], ints=[1, 2], basics=[Basic [int32=123, string=Hello], Basic [int32=124, string=Hello]]]", new ArrayMsg(new String[]{"a", "b"}, new int[]{1, 2}, new Basic[]{new Basic(123, "Hello"), new Basic(124, "Hello")}).toString()); assertEquals("ArrayMsg [strings=[], ints=[], basics=[null]]", new ArrayMsg(new String[0], new int[0], new Basic[]{null}).toString()); assertEquals("ArrayMsg [strings=[], ints=[], basics=[null, null]]", new ArrayMsg(new String[0], new int[0], new Basic[]{null, null}).toString()); }
@Test public void testNumbersToString() { assertEquals("Numbers [f32=0.0, f64=0.0]", new Numbers(0,0).toString()); }
@Test public void testDynamicGroupToString() { assertEquals("FooBar [fooOrBar=Foo [x=1]]", new FooBar(new Foo(1)).toString()); assertEquals("FooBar [fooOrBar=Bar [x=1, y=2]]", new FooBar(new Bar(1, 2)).toString()); }
@Test public void testDateTimesToString() { DateTimes msg = new DateTimes(); assertEquals("DateTimes [timestamp=1970-01-01 00:00:00.000, dateTimestamp=null]", msg.toString()); msg.dateTimestamp = new Date(0L); assertEquals("DateTimes [timestamp=1970-01-01 00:00:00.000, dateTimestamp=1970-01-01 00:00:00.000]", msg.toString()); }