added conditional compilation for unit tests