InjectMocks behaving differently with Java 6 and 7?

Yes, correct on these field Mockito cannot clear the ambiguity, so it simply ignores these ambiguous fields.

Mockito's behaviour is undefined, if there's more than one mock that matches one of the fields that is going to be injected. Here, "matches" means it's the right type, ignoring any type parameters - type erasure prevents Mockito from knowing about the type parameters. So in your example, either of the two mocks could be injected into either of the two fields.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions