updated test.java with strategy creating factory