The following issues were found

src/test/java/com/alibaba/json/bvt/support/spring/FastjsonSockJsMessageCodecTest_encode.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

              import junit.framework.TestCase;

public class FastjsonSockJsMessageCodecTest_encode extends TestCase {
    public void test_encode() throws Exception {
        FastjsonSockJsMessageCodec fastjsonCodec = new FastjsonSockJsMessageCodec();
        Jackson2SockJsMessageCodec jacksonCodec = new Jackson2SockJsMessageCodec();
        
        String v0 = "a0\"\0", v1 = "a1";
        String fastjsonResult = fastjsonCodec.encode(v0, v1);

            

Reported by PMD.

Use one line for each declaration, it enhances code readability.
Design

Line: 15

                      FastjsonSockJsMessageCodec fastjsonCodec = new FastjsonSockJsMessageCodec();
        Jackson2SockJsMessageCodec jacksonCodec = new Jackson2SockJsMessageCodec();
        
        String v0 = "a0\"\0", v1 = "a1";
        String fastjsonResult = fastjsonCodec.encode(v0, v1);
        String jacksonResult = jacksonCodec.encode(v0, v1);
        Assert.assertEquals(jacksonResult, fastjsonResult);
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/DefaultObjectDeserializerTest12.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              
public class DefaultObjectDeserializerTest12 extends TestCase {

    public void test_list() throws Exception {
        A a = new A();
        DefaultJSONParser parser = new DefaultJSONParser("{\"values\":[]}", ParserConfig.getGlobalInstance());
        parser.parseObject(a);
        parser.close();
    }

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 12

              
public class DefaultObjectDeserializerTest12 extends TestCase {

    public void test_list() throws Exception {
        A a = new A();
        DefaultJSONParser parser = new DefaultJSONParser("{\"values\":[]}", ParserConfig.getGlobalInstance());
        parser.parseObject(a);
        parser.close();
    }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ConstructorErrorTest_private.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              
public class ConstructorErrorTest_private extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class);
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '13'-'17').
Error

Line: 13

              public class ConstructorErrorTest_private extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ConstructorErrorTest_inner.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              
public class ConstructorErrorTest_inner extends TestCase {

    public void test_error() throws Exception {
        JSONObject obj = new JSONObject();
        obj.put("value", new JSONObject());
        Exception error = null;
        try {
            obj.toJavaObject(Model.class);

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '15'-'19').
Error

Line: 15

                  public void test_error() throws Exception {
        JSONObject obj = new JSONObject();
        obj.put("value", new JSONObject());
        Exception error = null;
        try {
            obj.toJavaObject(Model.class);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ConstructorErrorTest_initError_private.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 13

              
public class ConstructorErrorTest_initError_private extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class, Feature.InitStringFieldAsEmpty);
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '14'-'18').
Error

Line: 14

              public class ConstructorErrorTest_initError_private extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class, Feature.InitStringFieldAsEmpty);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ConstructorErrorTest_initError.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 13

              
public class ConstructorErrorTest_initError extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class, Feature.InitStringFieldAsEmpty);
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '14'-'18').
Error

Line: 14

              public class ConstructorErrorTest_initError extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class, Feature.InitStringFieldAsEmpty);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ConstructorErrorTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              
public class ConstructorErrorTest extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class);
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '13'-'17').
Error

Line: 13

              public class ConstructorErrorTest extends TestCase {

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{}", Model.class);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/util/JavaBeanInfoTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 7

              import junit.framework.TestCase;

public class JavaBeanInfoTest extends TestCase {
    public void test_0() throws Exception {
        JavaBeanInfo.getBuilderClass(null);
    }
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 7

              import junit.framework.TestCase;

public class JavaBeanInfoTest extends TestCase {
    public void test_0() throws Exception {
        JavaBeanInfo.getBuilderClass(null);
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/BigDecimalDeserializerTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 16

              
public class BigDecimalDeserializerTest extends TestCase {

    public void test_bigdecimal() throws Exception {
        Assert.assertEquals(BigDecimal.ZERO, JSON.parseObject("0", BigDecimal.class));
        Assert.assertEquals(BigDecimal.ZERO, JSON.parseObject("'0'", BigDecimal.class));
        Assert.assertEquals(new BigDecimal("0.0"), JSON.parseObject("0.0", BigDecimal.class));
        Assert.assertEquals(new BigDecimal("0.0"), JSON.parseObject("'0.0'", BigDecimal.class));


            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 25

                      Assert.assertEquals(null, JSON.parseObject("null", BigDecimal.class));

        DefaultJSONParser parser = new DefaultJSONParser("null", ParserConfig.getGlobalInstance(), JSON.DEFAULT_PARSER_FEATURE);
        Assert.assertEquals(null, BigDecimalCodec.instance.deserialze(parser, null, null));
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/var/TwoTypeTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 9

               * Created by wenshao on 23/01/2017.
 */
public class TwoTypeTest extends TestCase {
    public void test_two() throws Exception {

    }

    public static class ModelA {
        public int id;

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 9

               * Created by wenshao on 23/01/2017.
 */
public class TwoTypeTest extends TestCase {
    public void test_two() throws Exception {

    }

    public static class ModelA {
        public int id;

            

Reported by PMD.