migrate some test to mockito