session.execute("CREATE TYPE udttest.phone ( cntry varchar, city varchar, num varchar )");
session.execute("CREATE TYPE udttest.address ( street varchar, city varchar, country varchar, ph_num phone )");
Thread.sleep(500L);
KeyspaceMetadata ksm = cluster.getMetadata().getKeyspace("udttest");
Collection<UserType> uts = ksm.getUserTypes();
Assert.assertTrue(uts.size() >= 2);
UserType utPhone = ksm.getUserType("phone");
UserType utAddress = ksm.getUserType("address");
Assert.assertNotNull(utPhone);
Assert.assertNotNull(utAddress);
} finally {session.close();}
}