public async Task TestGetTimezoneByLocationId() { serviceMock.Setup(x => x.GetIANATimezoneAsync(It.IsAny <int>())).ReturnsAsync(new TimeZoneResult()); var response = await controller.GetTimezoneByLocationIdAsync(1); Assert.IsInstanceOfType(response, typeof(OkNegotiatedContentResult <TimeZoneResult>)); serviceMock.Verify(x => x.GetIANATimezoneAsync(It.IsAny <int>()), Times.Once()); }