changed tests to use moq