### Question:
PaymentServiceImpl implements PaymentService { @Override public Response addMoney(Payment info, HttpHeaders headers){ Money addMoney = new Money(); addMoney.setUserId(info.getUserId()); addMoney.setMoney(info.getPrice()); addMoneyRepository.save(addMoney); return new Response<>(1,"Add Money Success", addMoney); }  @Override Response pay(Payment info, HttpHeaders headers); @Override Response addMoney(Payment info, HttpHeaders headers); @Override Response query(HttpHeaders headers); @Override void initPayment(Payment payment, HttpHeaders headers);  }### Answer:
@Test public void testAddMoney() { Payment info = new Payment(); Mockito.when(addMoneyRepository.save(Mockito.any(Money.class))).thenReturn(null); Response result = paymentServiceImpl.addMoney(info, headers); Assert.assertEquals(new Response<>(1,"Add Money Success", new Money("", "")), result); }