Added unit tests for refactored mdadm module.