Refactoring test by Either methods. fpply is failing