LPS-38283 Recovered Factory pattern and sync with current code style
LPS-38283 Not need to check for null because we use factory and can be certain no null strings are going to be passed
LPS-38283 Source formatting
LPS-38260 last test for testing all the possibilities (true - any, true - approved, true -expired. false -any, false -approved, false -expired).