removed duplicate errors sending into apm and put errorCount on the error message
added uncommented test