a test to inherit protected field in scala and java