Added fakes for the api manager and piface for tests
wrote tests and code for OKState transitions