In this section you will use content assist to fill in a template for a common code structure. Open testlib.oclx file in the OCL editor if you do not already have it open.
endlibrary token)
in the OCL editor, press press Ctrl+Space to enable content assist. You will see a list of OCL Library elements.
When you single-click a template, or select it with the Up or Down arrow keys,
you'll see the code for the template in its help message.

Tests - Template entry and press Enter to confirm the template.
The template will be inserted in your source code.

public to protected.
To do so simply choose the proteced entry and press Enter.
Observe that the visibility kind of the tests is replaced and the cursor is moved to the next variable of the code template.
This is the name of the tests test_name.



protected tests
model models.new_file.uml
test test_name:
let result:Integer = getClassByName('C2').numberOfAttributes()
expected result = 1
endtests