Scope of JUnit changed to be just test

The JUnit Maven dependency did not have a scope defined.  The default is
the entire project.  JUnit should only be used in the test scope so
limiting it.
Builder throws state machine exception

On first design, the state builder base class threw a generic runtime
exception.  This is not good design and a state machine exception was
implemented just for this purpose.  This use was missed; changing it
now.