I have added the code new JSONObject(new JSONTokener(EsimActivationProcessor.class.getResourceAsStream)) to validate the input json request against the json schema. The validation on server and normal running. On testing the same class using junit I'm getting java.lang.NoSuchMethodError: org.json.JSONTokener.<init>(Ljava/io/InputStream;)V error.
I have added the following jar:
<dependency>
<groupId>org.everit.json</groupId>
<artifactId>org.everit.json.schema</artifactId>
<version>1.3.0</version>
</dependency>
I have tried removing conflicting methods in the jar springboot-test jar:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>