fix insertIfNotExist return value, update doc and corresponding test

not EE related, but a small fix for the testsuite