Refactor income warning service and add test for initial case