Changes as requested in code review.
Added more unit tests.
Use TestNG, not JUnit.
Moved method validation configuration into a value object.
Moved method rules building into configuration class.