Added tests for EMAlgorithm.