package org.wpattern.test.easy.buying.domain.user;

import org.apache.log4j.Logger;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.wpattern.easy.buying.domain.user.UserEntity;
import org.wpattern.easy.buying.domain.user.UserRepository;
import org.wpattern.easy.buying.permission.PermissionEntity;
import org.wpattern.test.easy.buying.utils.BaseTest;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class UserRepositoryTest extends BaseTest {

    private final Logger LOGGER = Logger.getLogger(this.getClass());

    @Autowired
    private UserRepository userRepository;

    @Test
    public void findAll_success() {
        List<UserEntity> users = userRepository.findAll();

        LOGGER.debug(users);

        assertNotNull(users);
        assertTrue(users.size() > 0);
    }
    
    @Test
    public void insert() {

        //Usuario
    UserEntity objUser = new UserEntity();
    objUser.setName("Wannisson");
    objUser.setEmail("wannisson@gmail.com");
    objUser.setPassword("123");
    objUser.setPhone("34991393623");
    userRepository.save(objUser);
        
    }

}

@@ -283,69 +283,8 @@
 ry;%0A
-import org.wpattern.easy.buying.permission.PermissionEntity;%0A
 impo
@@ -337,36 +337,8 @@
 t;%0A%0A
-import java.util.ArrayList;%0A
 impo
@@ -838,21 +838,17 @@
 ;%0A    %7D%0A
-    
 %0A
+
     @Tes
@@ -876,17 +876,16 @@
 ert() %7B%0A
-%0A
         
@@ -894,16 +894,20 @@
 Usuario%0A
+    
     User
@@ -941,16 +941,21 @@
 tity();%0A
+%0A    
     objU
@@ -976,24 +976,28 @@
 annisson%22);%0A
+    
     objUser.
@@ -1025,24 +1025,28 @@
 mail.com%22);%0A
+    
     objUser.
@@ -1065,24 +1065,28 @@
 %22123%22);%0A    
+ 
+   
 objUser.setP
@@ -1106,20 +1106,25 @@
 3623%22);%0A
+%0A 
     
+   
 userRepo
@@ -1149,17 +1149,8 @@
 r);%0A
-        %0A
     

Add security configurations.