public void testUpdate() throws Exception {
   Expense u = expRepo.findOne(exp2.getId());
   u.setValue(348);
   expRepo.update(u);
   Expense u1 = expRepo.findOne(u.getId());
   assertEquals(u.getValue(), u1.getValue());
 }
 public void testSave() throws Exception {
   int len = expRepo.size();
   assertEquals(2, len);
   final Expense exp3 = new Expense(PropertyType.CAR, 236, "euro");
   exp3.setUserId("test");
   expRepo.save(exp3);
   int len1 = expRepo.size();
   assertEquals(3, len1);
 }
 @Override
 protected void setUp() throws Exception {
   createRepo();
   exp1 = new Expense(PropertyType.CAR, 24, "lei");
   exp1.setUserId("razvan");
   expRepo.save(exp1);
   exp2 = new Expense(PropertyType.EAT, 567, "euro");
   exp2.setUserId("razvan");
   expRepo.save(exp2);
 }
 public void testFindAll() throws Exception {
   int len1 = expRepo.size();
   assertEquals(2, len1);
 }
 public void testFindOne() throws Exception {
   Expense u = expRepo.findOne(exp2.getId());
   assertEquals(u, exp2);
 }
 public void testDelete() throws Exception {
   expRepo.delete(exp2.getId());
   int len1 = expRepo.size();
   assertEquals(1, len1);
 }