Repositório jpa de dados Spring Caso de teste na memória
No meu projeto, escrevi uma classe de repositório para a qual preciso escrever na classe de teste na memória. Meu código de repositório é o seguinte.
package org.jaap.reference.repository;
import java.util.List;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;
import org.jaap.entity.AccountType;
/**
* Repository for type
*
*/
@Repository
public interface AccountTypeRepository
extends JpaRepository<AccountType, Integer>, QueryDslPredicateExecutor<Type> {
/**
* @param AccountTypeCode
* @return List<Type>
*/
@Query("select T from AccountType T where T.AccountTypeCode not in ?# {@environment.getProperty('commit.types').split(',')}")
List<AccountType> findByAccountTypeCodeNotIn();
}
para isso eu preciso escrever um caso de teste de unidade usando junit, mockito alguém pode me ajudar?