Unit testing for Element class