Convert to unit test