tests for inject function