@Test
public void testGetLocalAttributeNames() {

    AttributeContext context = new BasicAttributeContext();
    context.putAttribute("name1", new Attribute("value1"), false);
    context.putAttribute("name2", new Attribute("value2"), true);
    context.putAttribute("name3", new Attribute("value3a"), true);
    context.putAttribute("name3", new Attribute("value3"), false);
    Set<String> names = context.getLocalAttributeNames();
    assertTrue("Attribute name1 is not present", names.contains("name1"));
    assertFalse("Attribute name2 is present", names.contains("name2"));
    assertTrue("Attribute name3 is not present", names.contains("name3"));
}