Issue #494 Add unit test