@Test
	public void testCharsToRemoveField() {
		// 'charsToRemove' field should be equal to the length of
		// a part of variable/function/method name we are trying to complete here.
		// This allows us to correctly put a completion in cases when we really
		// just want to replace a piece of text (i.e. "CURRENTAddress" => "currentAddress")
		// rather than simply 'complete' it.

		assertCharsToRemoveEqualsTo("my_int", "my_int".length());
		assertCharsToRemoveEqualsTo("employee.get", "get".length());
		assertCharsToRemoveEqualsTo("('noise', (1 + fact", "fact".length());

		assertCharsToRemoveEqualsTo("employee.", 0);
		assertCharsToRemoveEqualsTo("employee.getId(", 0);
	}
Tests for the Ghidra Python Interpreter's code completion functionality.
Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java