에러 일기
Cannot instantiate @InjectMocks field named ''! Cause: the type '' is an interface.
재원쓰
2023. 2. 9. 15:51
@InjectMocks으로 선언한 Service가 interface라서 발생한 에러. 인터페이스는 constructor를 만들 수 없다.
구현체인 ServiceImpl로 변경하면 해결된다.