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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -