EDX-641: Add unit tests