I'm using Eclipse-STS + EclEmma plugin to see coverage of my code. In all my abstract util classes (with only static methods) I see 3 missed instructions (Instructions Counter
report) at the class definition line:
No marker available at the left of the red line, so I do not know exactly what are these instructions. Maybe some constructors? What can I do to cover them?
One way I found to achieve 100% covering is to write a test method like this:
@Test
public void coverage(){
KeyEscaper a = new KeyEscaper() {
};
}
As soon as the issue touches only utils classes with all static methods, it's not a problem to instantiate them anonimously in such way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With