Here I write part of some software that will be used to manage laboratory tests for infection.
When an InfectionTest object is created, its state is set to false and isPositive must not be called. However, once the setStatus method has been called, its status is set to true and it is ok to call isPositive to find out whether the result was positive or negative.