The terrorism and other legislation amendment bill is expected to clear the upper house of the New South Wales parliament on Tuesday.