OidContainer { public String getSerializedData() { if (this.data == null) return ""; else { boolean isFirst = true; StringBuilder sb = new StringBuilder(); for (long l : data) { if (isFirst) isFirst = false; else sb.append("."); sb.append(l); } return sb.toString(); } } OidContainer();  OidContainer(long[] val); void parseSerializedData(String val); long[] getData(); void setData(long[] val); String getSerializedData();  }
@Test(groups = { "functional.encode", "primitives" }) public void testEncode() throws Exception { OidContainer oid = new OidContainer(getSourceData()); String s1 = oid.getSerializedData(); assertEquals(s1, getString()); }