Skip to content

Add Unit Test Cases - #192

Open
vanitha1822 wants to merge 2 commits into
release-3.9.0from
nd/vs/test_cases
Open

vanitha1822 wants to merge 2 commits into
release-3.9.0from
nd/vs/test_cases

fix: add unit test cases

816327f
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Sep 4, 2026 in 29s

Annotations

Check warning on line 158 in src/test/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncServiceImplTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this variable to not match a restricted identifier.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hNjznKcUKZO7oEt&open=AaBr5hNjznKcUKZO7oEt&pullRequest=192

Check warning on line 268 in src/test/java/com/iemr/common/identity/service/elasticsearch/ElasticsearchSyncServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "times".

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hNLznKcUKZO7oEp&open=AaBr5hNLznKcUKZO7oEp&pullRequest=192

Check warning on line 253 in src/test/java/com/iemr/common/identity/utils/JwtUtilTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "never".

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hMMznKcUKZO7oEb&open=AaBr5hMMznKcUKZO7oEb&pullRequest=192

Check warning on line 258 in src/test/java/com/iemr/common/identity/service/elasticsearch/ElasticsearchSyncServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hNLznKcUKZO7oEo&open=AaBr5hNLznKcUKZO7oEo&pullRequest=192

Check warning on line 39 in src/test/java/com/iemr/common/identity/utils/response/OutputResponseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'org.junit.jupiter.params.ParameterizedTest'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLVznKcUKZO7oES&open=AaBr5hLVznKcUKZO7oES&pullRequest=192

Check warning on line 97 in src/test/java/com/iemr/common/identity/utils/validator/ValidatorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLqznKcUKZO7oEV&open=AaBr5hLqznKcUKZO7oEV&pullRequest=192

Check warning on line 153 in src/test/java/com/iemr/common/identity/utils/redis/RedisStorageTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLKznKcUKZO7oEG&open=AaBr5hLKznKcUKZO7oEG&pullRequest=192

Check warning on line 83 in src/test/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace these 3 tests with a single Parameterized one.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hOpznKcUKZO7oE5&open=AaBr5hOpznKcUKZO7oE5&pullRequest=192

Check warning on line 5 in src/test/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'com.iemr.common.identity.TestJson.parse'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hOpznKcUKZO7oE7&open=AaBr5hOpznKcUKZO7oE7&pullRequest=192

Check warning on line 322 in src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hO2znKcUKZO7oFB&open=AaBr5hO2znKcUKZO7oFB&pullRequest=192

Check warning on line 40 in src/test/java/com/iemr/common/identity/utils/response/OutputResponseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'org.junit.jupiter.params.provider.ValueSource'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLVznKcUKZO7oET&open=AaBr5hLVznKcUKZO7oET&pullRequest=192

Check warning on line 6 in src/test/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'com.iemr.common.identity.TestJson.str'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hOpznKcUKZO7oE8&open=AaBr5hOpznKcUKZO7oE8&pullRequest=192

Check warning on line 109 in src/test/java/com/iemr/common/identity/service/elasticsearch/BeneficiaryElasticsearchIndexUpdaterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hMqznKcUKZO7oEj&open=AaBr5hMqznKcUKZO7oEj&pullRequest=192

Check warning on line 126 in src/test/java/com/iemr/common/identity/service/elasticsearch/BeneficiaryElasticsearchIndexServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' and ensure that the list is unmodified.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hM0znKcUKZO7oEk&open=AaBr5hM0znKcUKZO7oEk&pullRequest=192

Check warning on line 334 in src/test/java/com/iemr/common/identity/service/elasticsearch/ElasticsearchSyncServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hNLznKcUKZO7oEq&open=AaBr5hNLznKcUKZO7oEq&pullRequest=192

Check warning on line 1531 in src/test/java/com/iemr/common/identity/service/IdentityServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hNyznKcUKZO7oEx&open=AaBr5hNyznKcUKZO7oEx&pullRequest=192

Check warning on line 27 in src/test/java/com/iemr/common/identity/utils/redis/RedisStorageTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'org.mockito.ArgumentMatchers.anyInt'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLKznKcUKZO7oEH&open=AaBr5hLKznKcUKZO7oEH&pullRequest=192

Check warning on line 30 in src/test/java/com/iemr/common/identity/config/ConverterAndBeanConfigTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'org.mockito.Mockito.verify'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hPKznKcUKZO7oFG&open=AaBr5hPKznKcUKZO7oFG&pullRequest=192

Check warning on line 253 in src/test/java/com/iemr/common/identity/utils/JwtUtilTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "verify".

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hMMznKcUKZO7oEa&open=AaBr5hMMznKcUKZO7oEa&pullRequest=192

Check warning on line 193 in src/test/java/com/iemr/common/identity/utils/response/OutputResponseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'org.json.JSONException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLVznKcUKZO7oEQ&open=AaBr5hLVznKcUKZO7oEQ&pullRequest=192

Check warning on line 514 in src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "doThrow".

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hO2znKcUKZO7oFD&open=AaBr5hO2znKcUKZO7oFD&pullRequest=192

Check warning on line 25 in src/test/java/com/iemr/common/identity/utils/JsonHelpersTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import 'org.junit.jupiter.api.Assertions.assertNotNull'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hMgznKcUKZO7oEi&open=AaBr5hMgznKcUKZO7oEi&pullRequest=192

Check warning on line 142 in src/test/java/com/iemr/common/identity/utils/response/OutputResponseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'org.json.JSONException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hLVznKcUKZO7oEM&open=AaBr5hLVznKcUKZO7oEM&pullRequest=192

Check warning on line 65 in src/test/java/com/iemr/common/identity/config/ElasticsearchSyncConfigTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hPAznKcUKZO7oFF&open=AaBr5hPAznKcUKZO7oFF&pullRequest=192

Check failure on line 75 in src/test/java/com/iemr/common/identity/utils/JsonHelpersTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AaBr5hMgznKcUKZO7oEf&open=AaBr5hMgznKcUKZO7oEf&pullRequest=192