public void testProtectedAccessSpecifier() throws Exception {
TranslationUnit unit = parse(
"class A { protected: void foo() {} void bar() {} };");
ClassDeclaration classA = unit.getChild(0);
FunctionDefinition functionFoo = classA.getChild(0);
Visibility visibilityFoo = functionFoo.getVisibility();
assertEquals(Visibility.PROTECTED, visibilityFoo);
FunctionDefinition functionBar = classA.getChild(1);
Visibility visibilityBar = functionBar.getVisibility();
assertEquals(Visibility.PROTECTED, visibilityBar);
}