java.lang.NoSuchMethodError: org.json.JSONObject.<init>(Ljava/lang/Object;)V

It looks like you have more than one org.json:json dependency on your classpath.

Looking at it:

org.springframework.boot:spring-boot-starter-test depends on

com.jayway.jsonpath:json-pathwhich in turn brings

org.json:json which is may be newer/older than the version on which

io.jsonwebtoken jjwt 0.9.1 is dependend on

You could try excluding this transitive dependency from spring-boot-starter-test/io.jsonwebtoken:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </exclusion>
    </exclusions>
</dependency>

OR/AND

<dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt</artifactId>
    <version>0.9.1</version>
    <exclusions>
        <exclusion>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </exclusion>
    </exclusions>
</dependency>

But it's possible that there is something within json-path which depends on something from the older json library, which is no longer in the newer version, so proceed with caution and test everything thoroughly. There is also a chance that something else brings org.json:json.

To verify, please run mvn dependency:tree and search in the produced output for org.json:json.