java - How to mock Guava Maps.newConcurrentMap() -
how mock this?
public class myclass { }
use dependency injection:
public class myclass { private map<string, myclassmodel> list; // don't initialize. public myclass(map<string, myclassmodel> list) { // inject ctor. this.list = list; } }
Comments
Post a Comment