Add locks and expectations