Mock an object once