So I have an interface, let's call it X
So in the regular code i have:
public class doStuff()
{
@Autowired
private X x;
public stuff()
{
x.doYourThing();
}
}
I have no idea how to test this though.
If i try:
public class XTest()
{
@Autowired
private X x;
public void test(){
string val = x.FillUpVal();
assertTrue("It didn't work",val=="hi");
}
}
I get x as null so it immediately throws a NullPointerException and fails the test. I'm looking for some guidance as to the proper way to go about this.