Mockito logic test