started porting ChallengeFactory.doTest (incomplete)