Unit testing of convertElement method