slightly refactored the DotGraphRenderer

added test to validate behaviour when an invalid entry state is given.
added onEntry and onExit methods to IState