@Test
public void testAccess()
{

    OSMWay way = new OSMWay(1);
    assertFalse(encoder.acceptWay(way) > 0);
    way.setTag("highway", "service");
    assertTrue(encoder.acceptWay(way) > 0);
    way.setTag("access", "no");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("highway", "track");
    assertTrue(encoder.acceptWay(way) > 0);
    way.setTag("motorcar", "no");
    assertFalse(encoder.acceptWay(way) > 0);
    // for now allow grade1+2+3 for every country, see #253
    way.clearTags();
    way.setTag("highway", "track");
    way.setTag("tracktype", "grade2");
    assertTrue(encoder.acceptWay(way) > 0);
    way.setTag("tracktype", "grade4");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("highway", "service");
    way.setTag("access", "delivery");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("highway", "unclassified");
    way.setTag("ford", "yes");
    assertFalse(encoder.acceptWay(way) > 0);
    way.setTag("motorcar", "yes");
    assertTrue(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("route", "ferry");
    assertTrue(encoder.acceptWay(way) > 0);
    assertTrue(encoder.isFerry(encoder.acceptWay(way)));
    way.setTag("motorcar", "no");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("route", "ferry");
    way.setTag("foot", "yes");
    assertFalse(encoder.acceptWay(way) > 0);
    assertFalse(encoder.isFerry(encoder.acceptWay(way)));
    
    way.clearTags();
    way.setTag("access", "yes");
    way.setTag("motor_vehicle", "no");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("highway", "service");
    way.setTag("access", "yes");
    way.setTag("motor_vehicle", "no");
    assertFalse(encoder.acceptWay(way) > 0);
    way.clearTags();
    way.setTag("highway", "service");
    way.setTag("access", "no");
    way.setTag("motorcar", "yes");
    assertTrue(encoder.acceptWay(way) > 0);
}