added unit test of capi for wrong type check