Add tests for BEM part of the library