Tests in logic layer and data layer