added unit tests for factories and hydrators