Reason 1: you are using junit / mockito outside the scope of test
remove <scope>test</scope>
, don’t need to include hamcrest dependency (this is included in junit or mockito)
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.9.0</version>
</dependency>