Tests are code, too, but they don't get as much attention, often leaving messy, hard to understand tests. Poorly factored tests can also make refactoring production code more difficult, resulting in even messier code.
In this session, we'll start with what we need from a good test, using AssertJ and JUnit features to make it readable and maintainable. We'll walk up the ladder from Helper methods, shared Factory Methods, all the way to Test Data Builders, discussing how and when to make the transition between them. We'll look at test "smells" and how to repair them, using Parameterized Tests. If time allows, we'll see how to "retarget" your tests when extracting a new production class from existing code.
While the code is in Java, the principles and techniques apply to most languages.