Better startswith and endswith code coverage