[Tests] Move test code to EDT

Move test code to event dispatch thread in
an effort to avoid intermittent test failures.