Feature/tasx 4 user domain class

No, you usually can't write a test for a private method. Technically you could write some java code using reflection to call a private method or use groovy metaprogramming to alter the visibility of the method, but that adds an extra layer of complexity.

The easiest thing might be to factor out the sha256sum into a separate public static method and test that static public method. Yes, testing the User.setPassword method would be good as well. You don't have to test out the constructor unless you want to. It's a little overkill to test the constructor since it's pretty basic.