@Test
public void testPriority()
{

    OSMWay way = new OSMWay(1);
    way.setTag("highway", "cycleway");
    assertEquals(PriorityCode.UNCHANGED.getValue(), footEncoder.handlePriority(way, 0));
    way.setTag("highway", "primary");
    assertEquals(PriorityCode.REACH_DEST.getValue(), footEncoder.handlePriority(way, 0));
    way.setTag("highway", "track");
    way.setTag("bicycle", "official");
    assertEquals(PriorityCode.AVOID_IF_POSSIBLE.getValue(), footEncoder.handlePriority(way, 0));
    way.setTag("highway", "track");
    way.setTag("bicycle", "designated");
    assertEquals(PriorityCode.AVOID_IF_POSSIBLE.getValue(), footEncoder.handlePriority(way, 0));
    way.setTag("highway", "cycleway");
    way.setTag("bicycle", "designated");
    way.setTag("foot", "designated");
    assertEquals(PriorityCode.PREFER.getValue(), footEncoder.handlePriority(way, 0));
    way.clearTags();
    way.setTag("highway", "primary");
    way.setTag("sidewalk", "yes");
    assertEquals(PriorityCode.REACH_DEST.getValue(), footEncoder.handlePriority(way, 0));
    way.clearTags();
    way.setTag("highway", "cycleway");
    way.setTag("sidewalk", "no");
    assertEquals(PriorityCode.UNCHANGED.getValue(), footEncoder.handlePriority(way, 0));
    way.clearTags();
    way.setTag("highway", "road");
    way.setTag("bicycle", "official");
    way.setTag("sidewalk", "no");
    assertEquals(PriorityCode.AVOID_IF_POSSIBLE.getValue(), footEncoder.handlePriority(way, 0));
    
    way.clearTags();
    way.setTag("highway", "residential");        
    way.setTag("sidewalk", "yes");
    assertEquals(PriorityCode.PREFER.getValue(), footEncoder.handlePriority(way, 0));                
}