### Question:
TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } TypeScope(); DataType type(String name);  }### Answer:
@Test public void create_find_types() throws Exception { TypeScope ts = new TypeScope(); PrimitiveScope ps = new PrimitiveScope(); ts.add(new NamedType("a", ps.int16())); ts.add(new NamedType("d", ps.int32())); assertEquals(ps.int16(), ts.type("a")); assertEquals(ps.int32(), ts.type("d")); assertNull(ts.type("e")); }