added tests for resolveMappings and cleaned up resolve Mappings