### Question:
InsidePaymentServiceImpl implements InsidePaymentService { @Override public Response queryAddMoney(HttpHeaders headers) { List<Money> monies = addMoneyRepository.findAll(); if (monies != null && !monies.isEmpty()) { return new Response<>(1, "Query Money Success", null); } else { return new Response<>(0, "", null); } }  @Override Response pay(PaymentInfo info, HttpHeaders headers); @Override Response createAccount(AccountInfo info, HttpHeaders headers); @Override Response addMoney(String userId, String money, HttpHeaders headers); @Override Response queryAccount(HttpHeaders headers); String queryAccount(String userId, HttpHeaders headers); @Override Response queryPayment(HttpHeaders headers); @Override Response drawBack(String userId, String money, HttpHeaders headers); @Override Response payDifference(PaymentInfo info, HttpHeaders headers); @Override Response queryAddMoney(HttpHeaders headers); @Override void initPayment(Payment payment, HttpHeaders headers); @Autowired
    public AddMoneyRepository addMoneyRepository; @Autowired
    public PaymentRepository paymentRepository; @Autowired
    public RestTemplate restTemplate; }### Answer:
@Test public void testQueryAddMoney1() { List<Money> monies = new ArrayList<>(); monies.add(new Money()); Mockito.when(addMoneyRepository.findAll()).thenReturn(monies); Response result = insidePaymentServiceImpl.queryAddMoney(headers); Assert.assertEquals(new Response<>(1, "Query Money Success", null), result); }
@Test public void testQueryAddMoney2() { Mockito.when(addMoneyRepository.findAll()).thenReturn(null); Response result = insidePaymentServiceImpl.queryAddMoney(headers); Assert.assertEquals(new Response<>(0, "", null), result); }