/**
 * Copyright 2016 Telefonica Investigación y Desarrollo, S.A.U
 *
 * This file is part of fiware-cygnus (FI-WARE project).
 *
 * fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
 * General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 * fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
 * http://www.gnu.org/licenses/.
 *
 * For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
 */
package com.telefonica.iot.cygnus.utils;

import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.apache.flume.Event;
import org.apache.flume.event.EventBuilder;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;

/**
 *
 * @author frb
 */
public final class CommonUtilsForTests {
    
    private static final int MAX_LEN_TEST_TRACE_HEAD = 60;
    
    /**
     * Constructor. It is private since utility classes should not have a public or default constructor.
     */
    private CommonUtilsForTests() {
    } // CommonUtilsForTests
    
    /**
     * Gets a trace head.
     * @param originalHead
     * @return A trace head
     */
    public static String getTestTraceHead(String originalHead) {
        String traceHead = originalHead;
        traceHead += " " + StringUtils.repeat("-", MAX_LEN_TEST_TRACE_HEAD - originalHead.length());
        return traceHead;
    } // getTestTraceHead
    
    /**
     * Creates a JSONObject-like notification.
     * @return A JSONObject-like notification
     */
    public static JSONObject createNotification() {
        JSONObject attribute = new JSONObject();
        attribute.put("name", "temperature");
        attribute.put("type", "centigrade");
        attribute.put("value", "26.5");
        JSONArray attributes = new JSONArray();
        attributes.add(attribute);
        JSONObject contextElement = new JSONObject();
        contextElement.put("attributes", attributes);
        contextElement.put("type", "Room");
        contextElement.put("isPattern", "false");
        contextElement.put("id", "room1");
        JSONObject statusCode = new JSONObject();
        statusCode.put("code", "200");
        statusCode.put("reasonPhrase", "OK");
        JSONObject contextResponse = new JSONObject();
        contextResponse.put("contextElement", contextElement);
        contextResponse.put("statusCode", statusCode);
        JSONArray contextResponses = new JSONArray();
        contextResponses.add(contextResponse);
        JSONObject notification = new JSONObject();
        notification.put("subscriptionId", "51c0ac9ed714fb3b37d7d5a8");
        notification.put("originator", "localhost");
        notification.put("contextResponses", contextResponses);
        return notification;
    } // createNotification
    
} // CommonUtilsForTests

@@ -959,235 +959,43 @@
 ort 
-java.util.HashMap;%0Aimport java.util.Map;%0Aimport org.apache.commons.lang.StringUtils;%0Aimport org.apache.flume.Event;%0Aimport org.apache.flume.event.EventBuilder;%0Aimport org.json.simple.JSONArray;%0Aimport org.json.simple.JSONObject
+org.apache.commons.lang.StringUtils
 ;%0A%0A/
@@ -1646,24 +1646,24 @@
  traceHead;%0A
+
     %7D // get
@@ -1685,1389 +1685,8 @@
    %0A
-    /**%0A     * Creates a JSONObject-like notification.%0A     * @return A JSONObject-like notification%0A     */%0A    public static JSONObject createNotification() %7B%0A        JSONObject attribute = new JSONObject();%0A        attribute.put(%22name%22, %22temperature%22);%0A        attribute.put(%22type%22, %22centigrade%22);%0A        attribute.put(%22value%22, %2226.5%22);%0A        JSONArray attributes = new JSONArray();%0A        attributes.add(attribute);%0A        JSONObject contextElement = new JSONObject();%0A        contextElement.put(%22attributes%22, attributes);%0A        contextElement.put(%22type%22, %22Room%22);%0A        contextElement.put(%22isPattern%22, %22false%22);%0A        contextElement.put(%22id%22, %22room1%22);%0A        JSONObject statusCode = new JSONObject();%0A        statusCode.put(%22code%22, %22200%22);%0A        statusCode.put(%22reasonPhrase%22, %22OK%22);%0A        JSONObject contextResponse = new JSONObject();%0A        contextResponse.put(%22contextElement%22, contextElement);%0A        contextResponse.put(%22statusCode%22, statusCode);%0A        JSONArray contextResponses = new JSONArray();%0A        contextResponses.add(contextResponse);%0A        JSONObject notification = new JSONObject();%0A        notification.put(%22subscriptionId%22, %2251c0ac9ed714fb3b37d7d5a8%22);%0A        notification.put(%22originator%22, %22localhost%22);%0A        notification.put(%22contextResponses%22, contextResponses);%0A        return notification;%0A    %7D // createNotification%0A    %0A
 %7D //

Remove unnecessary method