concept testing code in category java

This is an excerpt from Manning's book JUnit in Action.
If we run the tests now, we see that the code coverage is 100% (figure 20.7). So, refactoring the TDD application has helped both to improve the quality of the code and to increase the testing code.
There is another advantage of moving to BDD. Comparing the length of the pre-Cucumber AirportTest class, which has 207 lines, with the PassengersPolicy class, which has 157 lines, the testing code is only 75% of the pre-Cucumber size but has the same 100% coverage. Where does this gain come from? Remember that the AirportTest file contained seven classes on three levels: AirportTest at the top level; EconomyFlightTest and BusinessFlightTest at the second level; and, at the third level, two RegularPassenger and two VipPassenger classes. The code duplication is now really jumping to our attention, but that was the solution when we only had JUnit 5.