+function createEmptyCallback () {
+ return function (err) {
+ if (err) logger.error('Error in empty callback.', { error: err })
+ }
+}
+
+function isTestInstance () {
+ return (process.env.NODE_ENV === 'test')
+}
+
+function getFormatedObjects (objects, objectsTotal) {
+ const formatedObjects = []
+
+ objects.forEach(function (object) {
+ formatedObjects.push(object.toFormatedJSON())
+ })
+
+ return {
+ total: objectsTotal,
+ data: formatedObjects
+ }
+}
+