I need to provide some mock object array of this type "TypeA[]".
I am trying to do this but getting classcastexception:
List mockList = Mockito.anyListOf(TypeA.class);
when(someService.create(Mockito.any(TypeB.class), (TypeA[])mockList.toArray())).thenReturn(1);