src/test/java/ucar/geoapi/ContentVerifier.java
public boolean compareMetadata(final String path, final Object expectedValue, final Object... others) {
        final int length = others.length;
        final Map<String,Object> m = new LinkedHashMap<>((length - length/2) / 2);
        m.put(path, expectedValue);
        for (int i=0; i<length; i++) {
            final Object key = others[i];
            if (!(key instanceof String)) {
                throw new ClassCastException(String.format("others[%d] shall be a String, but given value class is %s.",
                            i, (key != null) ? key.getClass() : null));
            }
            final Object value = others[++i];
            final Object previous = m.put((String) key, value);
            if (previous != null) {
                throw new IllegalStateException(String.format("Metadata element \"%s\" is specified twice:"
                        + "%nValue 1: %s%nValue 2: %s%n", key, previous, value));
            }
        }
        return filterProperties(m.entrySet());
    }
/**
     * Compares actual metadata properties against the expected values.
     * The {@code path} argument identifies a metadata element like the following examples
     * ({@code [0]} is the index of an element in lists or collections):
     *
     * <ul>
     *   <li>{@code "identificationInfo[0].citation.identifier[0].code"}</li>
     *   <li>{@code "spatialRepresentationInfo[0].axisDimensionProperties[0].dimensionSize"}</li>
     * </ul>
     *
     * The {@code value} argument is the expected value for the property identified by the path.
     * Comparison result can be viewed after this method call with {@link #toString()}.
     *
     * @param  path           path of the property to compare.
     * @param  expectedValue  expected value for the property at the given path.
     * @param  others         other ({@code path}, {@code expectedValue}) pairs.
     * @return {@code true} if all properties match, with no missing property and no unexpected property.
     */
Compares actual metadata properties against the expected values.
The  path argument identifies a metadata element like the following examples
( [0] is the index of an element in lists or collections).



The  value argument is the expected value for the property identified by the path.
Comparison result can be viewed after this method call with  #toString().

@param  path           path of the property to compare.
@param  expectedValue  expected value for the property at the given path.
@param  others         other ( path,  expectedValue) pairs.
@return  true if all properties match, with no missing property and no unexpected property.
Compares actual metadata properties against the expected values . The path argument identifies a metadata element like the following examples ( [ 0 ] is the index of an element in lists or collections ) . The value argument is the expected value for the property identified by the path . Comparison result can be viewed after this method call with #toString () . @param path path of the property to compare . @param expectedValue expected value for the property at the given path . @param others other ( path expectedValue ) pairs . @return true if all properties match with no missing property and no unexpected property .
public boolean compareMetadata(final String path, final Object expectedValue, final Object... others) {
        final int length = others.length;
        final Map<String,Object> m = new LinkedHashMap<>((length - length/2) / 2);
        m.put(path, expectedValue);
        for (int i=0; i<length; i++) {
            final Object key = others[i];
            if (!(key instanceof String)) {
                throw new ClassCastException(String.format("others[%d] shall be a String, but given value class is %s.",
                            i, (key != null) ? key.getClass() : null));
            }
            final Object value = others[++i];
            final Object previous = m.put((String) key, value);
            if (previous != null) {
                throw new IllegalStateException(String.format("Metadata element \"%s\" is specified twice:"
                        + "%nValue 1: %s%nValue 2: %s%n", key, previous, value));
            }
        }
        return filterProperties(m.entrySet());
    }
public boolean compareMetadata ( final String path , final Object expectedValue , final Object ... others ) { final int length = others . length ; final Map < String , Object > m = new LinkedHashMap < > ( ( length - length / 2 ) / 2 ) ; m . put ( path , expectedValue ) ; for ( int i = 0 ; i < length ; i ++ ) { final Object key = others [ i ] ; if ( ! ( key instanceof String ) ) { throw new ClassCastException ( String . format ( "others[%d] shall be a String, but given value class is %s." , i , ( key != null ) ? key . getClass ( ) : null ) ) ; } final Object value = others [ ++ i ] ; final Object previous = m . put ( ( String ) key , value ) ; if ( previous != null ) { throw new IllegalStateException ( String . format ( "Metadata element \"%s\" is specified twice:" + "%nValue 1: %s%nValue 2: %s%n" , key , previous , value ) ) ; } } return filterProperties ( m . entrySet ( ) ) ; }
Compares actual metadata properties against the expected values.
Compares actual metadata properties against the expected values .