How to call a method in other class which is accepting data provider

Hi There, I am trying build framework for a project using appium. I have written code for login page accepting username and password from data provider. Now i want to call that method in other class inside @beforetest . Please help as i am unable to call . Also can anyone provide me complete framework of a sample project so that i can get some some ideas on framework architecture.