Fixed mock based tests