added proper tests for elasticsearch