Use assert instead of throwing a RuntimeException