@Test
public void testBasicCondition()
    throws Exception
{

    StringBuilder sb = new StringBuilder();
    sb.append( "<filter>" );
    sb.append( "  <or>" );
    sb.append( "    <and>" );
    sb.append( "      <equals>" );
    sb.append( "        <extension/>" );
    sb.append( "        <string>jar</string>" );
    sb.append( "      </equals>" );
    sb.append( "      <not>" );
    sb.append( "        <equals>" );
    sb.append( "          <property>native</property>" );
    sb.append( "          <string>true</string>" );
    sb.append( "        </equals>" );
    sb.append( "      </not>" );
    sb.append( "    </and>" );
    sb.append( "    <!-- Maybe /usr/share/java is not the best place to store" );
    sb.append( "         ZIP files, but packages are doing so anyways and" );
    sb.append( "         allowing ZIPs here simplifies packaging.  TODO: find a" );
    sb.append( "         better location for ZIP files.  -->" );
    sb.append( "    <equals>" );
    sb.append( "      <extension/>" );
    sb.append( "      <string>zip</string>" );
    sb.append( "    </equals>" );
    sb.append( "  </or>" );
    sb.append( "</filter>" );
    Condition cond = new Condition( buildDom( sb ) );
    assertTrue( cond.getValue( context1 ) );
    assertFalse( cond.getValue( context2 ) );
}