tidying up capi test

Cleans up the test for the capi component.

cc @ironsidevsquincy