Sprint task - Java API - Adjusted test for factories, small change in class generator