test and fix factories and replace spork with spring