Make tests expect exception. Plus fix style.