Code example for UUID

Methods: version

0
    @Test 
    public void verifyType1() throws UnknownHostException 
    { 
         
        UUID uuid = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"));
        assert uuid.version() == 1;
    } 
 
    @Test 
    public void verifyOrdering1() throws UnknownHostException 
    { 
        UUID one = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"));
        UUID two = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.2"));
        assert one.timestamp() < two.timestamp();
    } 
 
 
    @Test 
    public void testDecomposeAndRaw() throws UnknownHostException 
    { 
        UUID a = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"));