DefaultUDT implements UDT { @Override public <T> T get(Class<T> clazz) throws NullPointerException, UnsupportedOperationException { Objects.requireNonNull(clazz, "clazz is required"); return Value.of(columns).get(clazz); } DefaultUDT(String name, String userType, List<Column> columns); @Override String getName(); @Override Value getValue(); @Override T get(Class<T> clazz); @Override T get(TypeSupplier<T> typeSupplier); @Override Object get(); @Override String getUserType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void shouldReturnGetType() { List<Column> columns = new ArrayList<>(); columns.add(Column.of("firstname", "Ada")); columns.add(Column.of("lastname", "Lovelace")); UDT udt = UDT.builder("fullname").withName("name") .addUDT(columns).build(); List<Column> udtColumn = udt.get(new TypeReference<List<Column>>() { }); assertThat(columns, Matchers.containsInAnyOrder(Column.of("firstname", "Ada"), Column.of("lastname", "Lovelace"))); }