extract test type, add useful functionality.
test insert errors.