Not covred by test java

Hello,
i have an issue about the coverage code,
for example, i have made some change in the classe like this

Order order;
if(ID != null){
order = service.getOrder(ID);
}

and sonarcloud ask me to coverage these lines that i have changed

can you tell me how i can fix this

Hello,
And welcome to the community forum!

To fix it you should cover these lines with a new unit tests that verifies that this code works correctly.

that’s what i did, but it didn’t work, i still have the message: code not covered
thanks in advance

Are you able to see the coverage of other files in your project ? Maybe you should check if your analysis is correctly configured to take the coverage into account, you can have a look at this documentation page.

Can you share a link to the PR or piece of code that has the issue (actual code and test file) ?

I forgot to add the jacoco-maven-plugin plugin