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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -