title: @InjectMocks on a class that has primitives as fields
body: <p>Here's my class I'm trying to mock.  </p>
  
  <pre><code>private MemcachedClient memcachedClient;
  
  private CachedObjectFactory cachedObjectFactory;
  
  private int cacheTimeToLive;
  
  private boolean hasCert;
  
  @Autowired
  public MyClass(CachedObjectFactory cachedObjectFactory,
                           MemcachedClient memcachedClient,
                           @Value("${cache.ttl.in.second}") int cacheTimeToLive,
                           @Value("${hasCert}") boolean hasCert) {
      this.cachedObjectFactory = cachedObjectFactory;
      this.memcachedClient = memcachedClient;
      this.cacheTimeToLive = cacheTimeToLive;
      this.hasCert = hasCert;
  }
  </code></pre>
  
  <p>When I use <code>@InjectMocks</code>, it complains that it can't figure out how to initialize it with a default constructor (because there isn't one).  I think mockito could use create this, but I don't know how to inject a primitive (the boolean/cacheTimeToLive).  Is there a way to do this in my test?</p>