Add some tests to the implementation. Please note: This issue was transferred from a private Gitlab instance.