Add Constant class.

Continuation from #882 
Let's see what happens.
It's not generally a good idea for production code to depend on the details of your tests. I'm more concerned about developers calling this constructor by mistake and then getting a NullPointerException than I am about what tests look like. The purpose of a test is to execute cleanly and efficiently, and test the right functionality, not to look pretty.