}
@Test
public void testMethodVisibility() throws Exception
{
JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
MethodSource<JavaClassSource> method = javaClass.addMethod("public void hello()");
assertVisibility(Visibility.PUBLIC, method);
assertVisibility("public", method);
method = javaClass.addMethod("protected void hello()");
assertVisibility(Visibility.PROTECTED, method);
assertVisibility("protected", method);
method = javaClass.addMethod("private void hello()");
assertVisibility(Visibility.PRIVATE, method);
assertVisibility("private", method);
method = javaClass.addMethod("void hello()");
assertVisibility(Visibility.PACKAGE_PRIVATE, method);
assertVisibility("", method);
}