Smart completion tests

Added some tests for smart completion.