class ObjectUtil {

    public Map<String, Object> mergeConfigurations(Map<String, Object> firstMap, Map<String, Object> secondMap) {

        if ((firstMap != null) && (secondMap != null)) {
            return mergeMapsDeep(firstMap, secondMap);
        }

        if (secondMap != null) {
            return  secondMap;
        }

        return firstMap;
    }

}