Fix "Cannot resolve method" error in Java for methods from trait