There is a static Map in a class initialized as Map but their is no implementation of Map interface like HashMap or TreeMap in this class. Now I need to create a unit test case where I need to use this map in my project. but when I am trying to create an implementation of this in other class , I found null object every time. I think I am missing some core concept of java programming . Please help me in resolving this issue.
Here is class spinet using static map:
public static Map<Integer, someSpace> someSpaceMap = null;
public static boolean loadMyCache(){
try {
someSpaceMap = cacheService.getsomeSpaces();
} catch (Throwable e) {
e.printStackTrace();
return false;
}
}