What are Best Practices for Writing tests of Gradle Classes

Can someone point me to best practices or a solid example of tests for gradle classes?

I want start using TDD as I develop my build system gradle classes. I have one class now and will be building more as I create a DSL for my build. I want to use TDD and courageously refactor. My plan is to use simple Junit test but figure this must be a solved problem with good examples so I don’t need to discover all the nuances and gotchas on my own.

Please point me to doc or example of unit tests for gradle classes.