GUID { private GUID() {} private  GUID(); static ValueExpression guid(final String guid);  }
@Test public void parseGUID() { final Token guid = def("guid", 16, eq(guid("00c27766-f623-4200-9d64-115e9bfd4a08"))); assertTrue("be", guid.parse(env(stream(0x00, 0xc2, 0x77, 0x66, 0xf6, 0x23, 0x42, 0x00, 0x9d, 0x64, 0x11, 0x5e, 0x9b, 0xfd, 0x4a, 0x08))).isPresent()); assertTrue("le", guid.parse(env(stream(0x66, 0x77, 0xc2, 0x00, 0x23, 0xf6, 0x00, 0x42, 0x9d, 0x64, 0x11, 0x5e, 0x9b, 0xfd, 0x4a, 0x08), le())).isPresent()); _exception.expect(IllegalArgumentException.class); _exception.expectMessage("Invalid GUID string: test"); guid("test"); }