Mock Entity or DTO for unit tests Is this good approach, to mock some domain object, for example javax.persistence.Entity, or DTO (data transfer object)? Below is simplified source code:

@Entity
public class Entity {
    @Id
    private int id;
    private String name;
    // getters and setters
}

//Spring repo for example
@Repository
public interface EntityRepo {
    Entity findOne(int id);
}

@Component
public class SomeProcessing {
    private EntityRepo entityRepo;

    public SomeProcessing(int id) {
        entityRepo.findOne(id);
        //some logic which would be tested
    }

}

@RunWith(MockitoJUnitRunner.class)
public class SomeProcessingTest {
    @Mock
    private EntityRepo entityRepoMock;
    @Mock
    private Entity entityMock; //it this ok? Or better not to mock it and use just "new Entity()" with getters/setters

    @Test(){
        given(entityMock.getName()).willReturn("text");
        given(entityRepoMock.findOne(anyInt())).willReturn(entityMock);

        //here is other testing stuff
    }
}


Is my understanding correct, that this is refer to Classical vs Mockist testing? Or, there is any other issues not to use mocked Entity or DTO objects?
You don't need to mock the Entity/DTO object . Good practice is to create a new instance of DTO object and set data using setters .