LocalPageResponse localPageResponse = createLocalPageService.createLocalPage(filePath);
Gson finalResponse = new Gson();
response.getWriter().print(finalResponse.toJson(localPageResponse));
List<String> outputLogs = new ArrayList<>();
this is piece of code from servlet , while writing test class for same , not able to pass this "Gson finalResponse = new Gson()" line od code and showing error like
java.lang.NoClassDefFoundError: com/google/gson/internal/bind/JsonTreeReader
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javassist.runtime.Desc.getClassObject(Desc.java:43)
at javassist.runtime.Desc.getClassType(Desc.java:152)
at javassist.runtime.Desc.getType(Desc.java:122)
at javassist.runtime.Desc.getType(Desc.java:78)
......
I am trying to execute the test class, has anyone faced the same issue and if yes, how was it resolved?