### Question:
BindingProperty implements Comparable<BindingProperty> { @Override public int compareTo( @Nonnull final BindingProperty that ) { final int result = _name.compareTo( that._name ); if ( 0 != result ) { return result; } else { return _value.compareTo( that._value ); } } BindingProperty( @Nonnull final String name, @Nonnull final String value ); @Nonnull String getName(); @Nonnull String getValue(); @Nonnull String[] getComponents(); boolean matches( @Nonnull final String value ); @Override int compareTo( @Nonnull final BindingProperty that ); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void compareTo() { final BindingProperty property1 = new BindingProperty( "a", "1" ); final BindingProperty property2 = new BindingProperty( "a", "2" ); final BindingProperty property3 = new BindingProperty( "b", "1" ); assertEquals( property1.compareTo( property1 ), 0 ); assertEquals( property1.compareTo( property2 ), -1 ); assertEquals( property1.compareTo( property3 ), -1 ); assertEquals( property2.compareTo( property1 ), +1 ); assertEquals( property2.compareTo( property2 ), 0 ); assertEquals( property2.compareTo( property3 ), -1 ); assertEquals( property3.compareTo( property1 ), 1 ); assertEquals( property3.compareTo( property2 ), 1 ); assertEquals( property3.compareTo( property3 ), 0 ); }