You're getting your objects and factories mixed up. Look at my code snippets again. The object hierarchy goes like this, with each object accessed through the NewList method of the respective Factory.
TD
TestFactory
Test
DesignStepFactory
DesignStep
Of course you need to create the TD object first. I don't see you doing that. And stepcount is not an object - you don't set it.