How use graphhopper in my code

I want to use graphhopper in my code.
I create the JAR file of the source code and add this as the dependency of my project.

private static final String testOsm = “./src/test/resources/com/graphhopper/reader/osm/test-osm.xml”;

public GraphHopper hopper = new GraphHopperOSM().setDataReaderFile(testOsm);

but when the “hopper” does not have any method and when i want to import load said: can not resolve method

Can i have your kind assistance to help me how can i solve it?