Adding unit tests

I think the `If` component is no longer required here, is it?