title: Using ScalaTest to test java that contain @Autowired and private fields
body: <p>I have begun to use ScalaTest to test my Java code and I like it (I've read the "Testing in Scala" book).</p>
  
  <p>Recently I've been trying to test some java Spring code that contain fields which are marked <code>private</code> and <code>@Autowired</code>.  There are no setter methods for these fields.</p>
  
  <p>I realise that I could easily test them using JUnit + Mockito using the annotations <code>@InjectMocks</code> and <code>@Mock</code>, however, I would like to test them using ScalaTest and a mocking framework (such as Mockito or ScalaMock).</p>
  
  <p>My question: Can Scalatest + Mockito be used to mock out private fields or do these frameworks require that my java classes have a <code>public</code> setter method defined for my <code>private</code> + <code>@Autowired</code> fields?</p>