test class java, abstract factory low dependency