### Question:
Type extends IdName { public Validator getValidator( Field key ) { return validators.get( key ); } Type( int id, String name );  Type( String name ); Validator getValidator( Field key ); void putValidator( Field key, Validator vldtr ); void clearValidator( Field key ); Type getResult(); void setResult( Type rType ); ImportExportHelper getImportExportHelper(); void setImportExportHelper( ImportExportHelper helper ); Class<?> getComponentType(); void setComponentType( Class<?> clss ); Object getStubHelper(); void setStubHelper( Object stubHelper ); void lock(); Field addField( Field field ); Field getField( Integer id ); Field getField( String name ); Set<Field> getFields(); int getTimeout(); void setTimeout( int timeout ); Field getResponseField(); void setResponseField( Field responseField ); boolean isAssignableFrom( Type other ); void checkIsAssignableFrom( Type other ); Type superType(); void setSuperType( Type superType ); AsyncMode getAsyncMode(); void setAsyncMode( AsyncMode mode ); Direction getDirection(); void setDirection( Direction direction );  }### Answer:
@Test public void testGetValidator() throws Exception { Type t = new Type( "t" ); Field f = new Field( "f" ); Field g = new Field( "g" ); Validator v = Validator_int.get( 0 ); t.putValidator( f, v ); assertSame( v, t.getValidator( f ) ); assertNull( t.getValidator( g ) ); }