repaired unittest