Use assert and Preconditions.