refactor notnullconstraint test