public Type resolveReferenceType( Object name ) {
    if ( name instanceof String ) {
      ValueMetaInterface valueMeta = this.rowMeta.searchValueMeta( (String) name );
      if ( valueMeta != null ) {
        switch ( valueMeta.getType() ) {
          case ValueMetaInterface.TYPE_STRING:
            return TextType.TYPE;
          case ValueMetaInterface.TYPE_INTEGER:
          case ValueMetaInterface.TYPE_BIGNUMBER:
          case ValueMetaInterface.TYPE_NUMBER:
            return NumberType.GENERIC_NUMBER;
          default:
            return AnyType.TYPE;
        }
      }
    }
    return AnyType.TYPE;
  }
@Test
  public void testResolveReferenceTypeWithMetaTypeNotStringAndNotNumeric() {
    RowMetaInterface row = mock( RowMetaInterface.class );
    ValueMetaInterface valueMeta = mock( ValueMetaInterface.class );
    RowForumulaContext context = new RowForumulaContext( row );

    String name = "name";
    when( row.searchValueMeta( name ) ).thenReturn( valueMeta );
    when( valueMeta.getType() ).thenReturn( ValueMetaInterface.TYPE_DATE );

    Type type = context.resolveReferenceType( name );
    assertTrue( type instanceof AnyType );
  }