mocking based on specific classes

Unit Tests for mock object creation that are based on classes, minor bug
fixes