Skip to content

Commit 89e42e2

Browse files
committed
ExtendUUID Util.addressToString() test
1 parent 7a99652 commit 89e42e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/junit-functional/org/jgroups/tests/UtilTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,17 @@ public void testToUUID() throws Exception {
17191719
s=Util.addressToString(ip1);
17201720
ip2=Util.addressFromString(s);
17211721
assert ip1.equals(ip2);
1722+
1723+
byte[] symbNameKey = Util.stringToBytes("SYMBOLIC_NAME");
1724+
byte[] symbNameVal = Util.stringToBytes("member01");
1725+
1726+
ExtendedUUID euuid = ExtendedUUID.randomUUID();
1727+
euuid.put(symbNameKey, symbNameVal);
1728+
s = Util.addressToString(euuid);
1729+
assert s != null;
1730+
assert euuid instanceof ExtendedUUID;
1731+
ip2=Util.addressFromString(s);
1732+
assert ip2 != null;
17221733
}
17231734

17241735
protected static void check(Enumeration<Integer> en, Integer[] expected) {

0 commit comments

Comments
 (0)