added tests for fetch by type()