Refactor SimpleMembershipService isValid function and unit test it