diff --git a/dashboard/webapp-backend/eclipse-formatter.xml b/dashboard/webapp-backend/eclipse-formatter.xml
new file mode 100644
index 0000000..7339434
--- /dev/null
+++ b/dashboard/webapp-backend/eclipse-formatter.xml
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 Nordix Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================LICENSE_END===================================
+  -->
+<profiles version="13">
+<profile kind="CodeFormatterProfile" name="java-formatter" version="12">
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+</profile>
+</profiles>
+
diff --git a/dashboard/webapp-backend/pom.xml b/dashboard/webapp-backend/pom.xml
index 80bb585..f089180 100644
--- a/dashboard/webapp-backend/pom.xml
+++ b/dashboard/webapp-backend/pom.xml
@@ -36,6 +36,8 @@
     <properties>
         <springfox.version>2.9.2</springfox.version>
         <immutable.version>2.7.1</immutable.version>
+        <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
+        <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
         <!-- Set by Jenkins -->
         <build.number>0</build.number>
     </properties>
@@ -176,6 +178,32 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
             <plugin>
+                <groupId>net.revelc.code.formatter</groupId>
+                <artifactId>formatter-maven-plugin</artifactId>
+                <version>${formatter-maven-plugin.version}</version>
+                <configuration>
+                    <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
+                </configuration>
+                <!-- https://code.revelc.net/formatter-maven-plugin/ use
+                    mvn formatter:format spotless:apply process-sources -->
+            </plugin>
+            <plugin>
+                <groupId>com.diffplug.spotless</groupId>
+                <artifactId>spotless-maven-plugin</artifactId>
+                <version>${spotless-maven-plugin.version}</version>
+                <configuration>
+                    <java>
+                        <removeUnusedImports />
+                        <importOrder>
+                            <order>com,java,javax,org</order>
+                        </importOrder>
+                    </java>
+                </configuration>
+                <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
+                    use mvn spotless:apply to rewrite source files use mvn spotless:check to
+                    validate source files -->
+            </plugin>
+            <plugin>
                 <!-- Most configuration and all execution is inherited -->
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>license-maven-plugin</artifactId>
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java
index 333c532..2550b8e 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,27 +34,27 @@
 @ComponentScan("org.oransc.ric.portal.dashboard")
 public class DashboardApplication {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	public static void main(String[] args) throws IOException {
-		SpringApplication.run(DashboardApplication.class, args);
-		// Ensure this appears on the console by using level WARN
-		logger.warn("main: version '{}' successful start",
-				getImplementationVersion(MethodHandles.lookup().lookupClass()));
-	}
+    public static void main(String[] args) throws IOException {
+        SpringApplication.run(DashboardApplication.class, args);
+        // Ensure this appears on the console by using level WARN
+        logger.warn("main: version '{}' successful start",
+            getImplementationVersion(MethodHandles.lookup().lookupClass()));
+    }
 
-	/**
-	 * Gets version details for the specified class.
-	 * 
-	 * @param clazz
-	 *                  Class to get the version
-	 * 
-	 * @return the value of the MANIFEST.MF property Implementation-Version as
-	 *         written by maven when packaged in a jar; 'unknown' otherwise.
-	 */
-	public static String getImplementationVersion(Class<?> clazz) {
-		String classPath = clazz.getResource(clazz.getSimpleName() + ".class").toString();
-		return classPath.startsWith("jar") ? clazz.getPackage().getImplementationVersion() : "unknown-not-jar";
-	}
+    /**
+     * Gets version details for the specified class.
+     *
+     * @param clazz
+     *        Class to get the version
+     *
+     * @return the value of the MANIFEST.MF property Implementation-Version as
+     *         written by maven when packaged in a jar; 'unknown' otherwise.
+     */
+    public static String getImplementationVersion(Class<?> clazz) {
+        String classPath = clazz.getResource(clazz.getSimpleName() + ".class").toString();
+        return classPath.startsWith("jar") ? clazz.getPackage().getImplementationVersion() : "unknown-not-jar";
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java
index b82aa64..4b5d9a4 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java
@@ -21,24 +21,24 @@
 
 public abstract class DashboardConstants {
 
-	private DashboardConstants() {
-		// Sonar insists on hiding the constructor
-	}
+    private DashboardConstants() {
+        // Sonar insists on hiding the constructor
+    }
 
-	public static final String ENDPOINT_PREFIX = "/api";
-	// Factor out method names used in multiple controllers
-	public static final String VERSION_METHOD = "version";
-	public static final String APP_NAME_AC = "AC";
-	public static final String APP_NAME_MC = "MC";
-	// The role names are defined by ONAP Portal.
-	// The prefix "ROLE_" is required by Spring.
-	// These are used in Java code annotations that require constants.
-	public static final String ROLE_NAME_STANDARD = "Standard_User";
-	public static final String ROLE_NAME_ADMIN = "System_Administrator";
-	private static final String ROLE_PREFIX = "ROLE_";
-	public static final String ROLE_ADMIN = ROLE_PREFIX + ROLE_NAME_ADMIN;
-	public static final String ROLE_STANDARD = ROLE_PREFIX + ROLE_NAME_STANDARD;
-	public static final String POLICY_CONTROLLER_USERNAME = "admin";
-	public static final String POLICY_CONTROLLER_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U";
+    public static final String ENDPOINT_PREFIX = "/api";
+    // Factor out method names used in multiple controllers
+    public static final String VERSION_METHOD = "version";
+    public static final String APP_NAME_AC = "AC";
+    public static final String APP_NAME_MC = "MC";
+    // The role names are defined by ONAP Portal.
+    // The prefix "ROLE_" is required by Spring.
+    // These are used in Java code annotations that require constants.
+    public static final String ROLE_NAME_STANDARD = "Standard_User";
+    public static final String ROLE_NAME_ADMIN = "System_Administrator";
+    private static final String ROLE_PREFIX = "ROLE_";
+    public static final String ROLE_ADMIN = ROLE_PREFIX + ROLE_NAME_ADMIN;
+    public static final String ROLE_STANDARD = ROLE_PREFIX + ROLE_NAME_STANDARD;
+    public static final String POLICY_CONTROLLER_USERNAME = "admin";
+    public static final String POLICY_CONTROLLER_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U";
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardUserManager.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardUserManager.java
index c5fd101..ffb7396 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardUserManager.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardUserManager.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,6 +19,11 @@
  */
 package org.oransc.ric.portal.dashboard;
 
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
@@ -33,152 +38,146 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
 /**
  * Provides simple user-management services.
- * 
+ *
  * This first implementation serializes user details to a file.
- * 
+ *
  * TODO: migrate to a database.
  */
 public class DashboardUserManager {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// This default value is only useful for development and testing.
-	public static final String USER_FILE_PATH = "dashboard-users.json";
+    // This default value is only useful for development and testing.
+    public static final String USER_FILE_PATH = "dashboard-users.json";
 
-	private final File userFile;
-	private final List<EcompUser> users;
+    private final File userFile;
+    private final List<EcompUser> users;
 
-	/**
-	 * Development/test-only constructor that uses default file path.
-	 * 
-	 * @param clear
-	 *                  If true, start empty and remove any existing file.
-	 * 
-	 * @throws IOException
-	 *                         On file error
-	 */
-	public DashboardUserManager(boolean clear) throws IOException {
-		this(USER_FILE_PATH);
-		if (clear) {
-			logger.debug("ctor: removing file {}", userFile.getAbsolutePath());
-			File f = new File(DashboardUserManager.USER_FILE_PATH);
-			if (f.exists())
-				f.delete();
-			users.clear();
-		}
-	}
+    /**
+     * Development/test-only constructor that uses default file path.
+     *
+     * @param clear
+     *        If true, start empty and remove any existing file.
+     *
+     * @throws IOException
+     *         On file error
+     */
+    public DashboardUserManager(boolean clear) throws IOException {
+        this(USER_FILE_PATH);
+        if (clear) {
+            logger.debug("ctor: removing file {}", userFile.getAbsolutePath());
+            File f = new File(DashboardUserManager.USER_FILE_PATH);
+            if (f.exists())
+                f.delete();
+            users.clear();
+        }
+    }
 
-	/**
-	 * Constructur that accepts a file path
-	 * 
-	 * @param userFilePath
-	 *                         File path
-	 * @throws IOException
-	 *                         If file cannot be read
-	 */
-	public DashboardUserManager(final String userFilePath) throws IOException {
-		logger.debug("ctor: userfile {}", userFilePath);
-		if (userFilePath == null)
-			throw new IllegalArgumentException("Missing or empty user file property");
-		userFile = new File(userFilePath);
-		logger.debug("ctor: managing users in file {}", userFile.getAbsolutePath());
-		if (userFile.exists()) {
-			final ObjectMapper mapper = new ObjectMapper();
-			users = mapper.readValue(userFile, new TypeReference<List<EcompUser>>() {
-			});
-		} else {
-			users = new ArrayList<>();
-		}
-	}
+    /**
+     * Constructur that accepts a file path
+     *
+     * @param userFilePath
+     *        File path
+     * @throws IOException
+     *         If file cannot be read
+     */
+    public DashboardUserManager(final String userFilePath) throws IOException {
+        logger.debug("ctor: userfile {}", userFilePath);
+        if (userFilePath == null)
+            throw new IllegalArgumentException("Missing or empty user file property");
+        userFile = new File(userFilePath);
+        logger.debug("ctor: managing users in file {}", userFile.getAbsolutePath());
+        if (userFile.exists()) {
+            final ObjectMapper mapper = new ObjectMapper();
+            users = mapper.readValue(userFile, new TypeReference<List<EcompUser>>() {});
+        } else {
+            users = new ArrayList<>();
+        }
+    }
 
-	/**
-	 * Gets the current users.
-	 * 
-	 * @return List of EcompUser objects, possibly empty
-	 */
-	public List<EcompUser> getUsers() {
-		return this.users;
-	}
+    /**
+     * Gets the current users.
+     *
+     * @return List of EcompUser objects, possibly empty
+     */
+    public List<EcompUser> getUsers() {
+        return this.users;
+    }
 
-	/**
-	 * Gets the user with the specified login Id
-	 * 
-	 * @param loginId
-	 *                    Desired login Id
-	 * @return User object; null if Id is not known
-	 */
-	public EcompUser getUser(String loginId) {
-		for (EcompUser u : this.users) {
-			if (u.getLoginId().equals(loginId)) {
-				logger.debug("getUser: match on {}", loginId);
-				return u;
-			}
-		}
-		logger.debug("getUser: no match on {}", loginId);
-		return null;
-	}
+    /**
+     * Gets the user with the specified login Id
+     *
+     * @param loginId
+     *        Desired login Id
+     * @return User object; null if Id is not known
+     */
+    public EcompUser getUser(String loginId) {
+        for (EcompUser u : this.users) {
+            if (u.getLoginId().equals(loginId)) {
+                logger.debug("getUser: match on {}", loginId);
+                return u;
+            }
+        }
+        logger.debug("getUser: no match on {}", loginId);
+        return null;
+    }
 
-	private void saveUsers() throws JsonGenerationException, JsonMappingException, IOException {
-		final ObjectMapper mapper = new ObjectMapper();
-		mapper.writeValue(userFile, users);
-	}
+    private void saveUsers() throws JsonGenerationException, JsonMappingException, IOException {
+        final ObjectMapper mapper = new ObjectMapper();
+        mapper.writeValue(userFile, users);
+    }
 
-	/*
-	 * Allow at most one thread to create a user at one time.
-	 */
-	public synchronized void createUser(EcompUser user) throws PortalAPIException {
-		logger.debug("createUser: loginId is " + user.getLoginId());
-		if (users.contains(user))
-			throw new PortalAPIException("User exists: " + user.getLoginId());
-		users.add(user);
-		try {
-			saveUsers();
-		} catch (Exception ex) {
-			throw new PortalAPIException("Save failed", ex);
-		}
-	}
+    /*
+     * Allow at most one thread to create a user at one time.
+     */
+    public synchronized void createUser(EcompUser user) throws PortalAPIException {
+        logger.debug("createUser: loginId is " + user.getLoginId());
+        if (users.contains(user))
+            throw new PortalAPIException("User exists: " + user.getLoginId());
+        users.add(user);
+        try {
+            saveUsers();
+        } catch (Exception ex) {
+            throw new PortalAPIException("Save failed", ex);
+        }
+    }
 
-	/*
-	 * Allow at most one thread to modify a user at one time. We still have
-	 * last-edit-wins of course.
-	 */
-	public synchronized void updateUser(String loginId, EcompUser user) throws PortalAPIException {
-		logger.debug("editUser: loginId is " + loginId);
-		int index = users.indexOf(user);
-		if (index < 0)
-			throw new PortalAPIException("User does not exist: " + user.getLoginId());
-		users.remove(index);
-		users.add(user);
-		try {
-			saveUsers();
-		} catch (Exception ex) {
-			throw new PortalAPIException("Save failed", ex);
-		}
-	}
+    /*
+     * Allow at most one thread to modify a user at one time. We still have
+     * last-edit-wins of course.
+     */
+    public synchronized void updateUser(String loginId, EcompUser user) throws PortalAPIException {
+        logger.debug("editUser: loginId is " + loginId);
+        int index = users.indexOf(user);
+        if (index < 0)
+            throw new PortalAPIException("User does not exist: " + user.getLoginId());
+        users.remove(index);
+        users.add(user);
+        try {
+            saveUsers();
+        } catch (Exception ex) {
+            throw new PortalAPIException("Save failed", ex);
+        }
+    }
 
-	// Test infrastructure
-	public static void main(String[] args) throws Exception {
-		DashboardUserManager dum = new DashboardUserManager(false);
-		EcompUser user = new EcompUser();
-		user.setActive(true);
-		user.setLoginId("demo");
-		user.setFirstName("First");
-		user.setLastName("Last");
-		EcompRole role = new EcompRole();
-		role.setId(1L);
-		role.setName(DashboardConstants.ROLE_NAME_ADMIN);
-		Set<EcompRole> roles = new HashSet<>();
-		roles.add(role);
-		user.setRoles(roles);
-		dum.createUser(user);
-		logger.debug("Created user {}", user);
-	}
+    // Test infrastructure
+    public static void main(String[] args) throws Exception {
+        DashboardUserManager dum = new DashboardUserManager(false);
+        EcompUser user = new EcompUser();
+        user.setActive(true);
+        user.setLoginId("demo");
+        user.setFirstName("First");
+        user.setLastName("Last");
+        EcompRole role = new EcompRole();
+        role.setId(1L);
+        role.setName(DashboardConstants.ROLE_NAME_ADMIN);
+        Set<EcompRole> roles = new HashSet<>();
+        roles.add(role);
+        user.setRoles(roles);
+        dum.createUser(user);
+        logger.debug("Created user {}", user);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AdminConfiguration.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AdminConfiguration.java
index 696d74f..8c646fe 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AdminConfiguration.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AdminConfiguration.java
@@ -38,21 +38,21 @@
 @Profile("!test")
 public class AdminConfiguration {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// Populated by the autowired constructor
-	private final String userfile;
+    // Populated by the autowired constructor
+    private final String userfile;
 
-	@Autowired
-	public AdminConfiguration(@Value("${userfile}") final String userfile) {
-		logger.debug("ctor userfile '{}'", userfile);
-		this.userfile = userfile;
-	}
+    @Autowired
+    public AdminConfiguration(@Value("${userfile}") final String userfile) {
+        logger.debug("ctor userfile '{}'", userfile);
+        this.userfile = userfile;
+    }
 
-	@Bean
-	// The bean (method) name must be globally unique
-	public DashboardUserManager userManager() throws IOException {
-		return new DashboardUserManager(userfile);
-	}
+    @Bean
+    // The bean (method) name must be globally unique
+    public DashboardUserManager userManager() throws IOException {
+        return new DashboardUserManager(userfile);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/PortalApiConfiguration.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/PortalApiConfiguration.java
index f318cad..520f27f 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/PortalApiConfiguration.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/PortalApiConfiguration.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,24 +34,24 @@
 @Profile("!test")
 public class PortalApiConfiguration {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	/**
-	 * Instantiates the EPSDK-FW servlet that implements the API called by Portal.
-	 * Needed because this app is not configured to scan the EPSDK-FW packages;
-	 * there's also a chance that Spring-Boot does not automatically
-	 * process @WebServlet annotations.
-	 * 
-	 * @return Servlet registration bean for the Portal Rest API proxy servlet.
-	 */
-	@Bean
-	public ServletRegistrationBean<PortalRestAPIProxy> portalApiProxyServletBean() {
-		logger.debug("portalApiProxyServletBean");
-		PortalRestAPIProxy servlet = new PortalRestAPIProxy();
-		final ServletRegistrationBean<PortalRestAPIProxy> servletBean = new ServletRegistrationBean<>(servlet,
-				PortalApiConstants.API_PREFIX + "/*");
-		servletBean.setName("PortalRestApiProxyServlet");
-		return servletBean;
-	}
+    /**
+     * Instantiates the EPSDK-FW servlet that implements the API called by Portal.
+     * Needed because this app is not configured to scan the EPSDK-FW packages;
+     * there's also a chance that Spring-Boot does not automatically
+     * process @WebServlet annotations.
+     *
+     * @return Servlet registration bean for the Portal Rest API proxy servlet.
+     */
+    @Bean
+    public ServletRegistrationBean<PortalRestAPIProxy> portalApiProxyServletBean() {
+        logger.debug("portalApiProxyServletBean");
+        PortalRestAPIProxy servlet = new PortalRestAPIProxy();
+        final ServletRegistrationBean<PortalRestAPIProxy> servletBean =
+            new ServletRegistrationBean<>(servlet, PortalApiConstants.API_PREFIX + "/*");
+        servletBean.setName("PortalRestApiProxyServlet");
+        return servletBean;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SpringContextCache.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SpringContextCache.java
index 3a87782..a2f3d8f 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SpringContextCache.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SpringContextCache.java
@@ -30,15 +30,15 @@
 @Component
 public class SpringContextCache implements ApplicationContextAware {
 
-	private static ApplicationContext applicationContext = null;
+    private static ApplicationContext applicationContext = null;
 
-	@Override
-	public void setApplicationContext(final ApplicationContext appContext) throws BeansException {
-		applicationContext = appContext;
-	}
+    @Override
+    public void setApplicationContext(final ApplicationContext appContext) throws BeansException {
+        applicationContext = appContext;
+    }
 
-	public static ApplicationContext getApplicationContext() {
-		return applicationContext;
-	}
+    public static ApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SwaggerConfiguration.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SwaggerConfiguration.java
index b4bb0a3..435414a 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SwaggerConfiguration.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/SwaggerConfiguration.java
@@ -40,29 +40,29 @@
 @EnableSwagger2
 public class SwaggerConfiguration {
 
-	/**
-	 * @return new Docket
-	 */
-	@Bean
-	public Docket api() {
-		return new Docket(DocumentationType.SWAGGER_2).select() //
-				.apis(RequestHandlerSelectors.basePackage(DashboardApplication.class.getPackage().getName())) //
-				.paths(PathSelectors.any()) //
-				.build() //
-				.apiInfo(apiInfo());
-	}
+    /**
+     * @return new Docket
+     */
+    @Bean
+    public Docket api() {
+        return new Docket(DocumentationType.SWAGGER_2).select() //
+            .apis(RequestHandlerSelectors.basePackage(DashboardApplication.class.getPackage().getName())) //
+            .paths(PathSelectors.any()) //
+            .build() //
+            .apiInfo(apiInfo());
+    }
 
-	private ApiInfo apiInfo() {
-		final String version = DashboardApplication.class.getPackage().getImplementationVersion();
-		return new ApiInfoBuilder() //
-				.title("RIC Dashboard backend") //
-				.description("Proxies access to RIC services.")//
-				.termsOfServiceUrl("Terms of service") //
-				.contact(new Contact("RIC Dashboard Dev Team", //
-						"http://no-docs-yet.org/", //
-						"noreply@O-RAN-SC.org")) //
-				.license("Apache 2.0 License").licenseUrl("http://www.apache.org/licenses/LICENSE-2.0") //
-				.version(version == null ? "version not available" : version) //
-				.build();
-	}
+    private ApiInfo apiInfo() {
+        final String version = DashboardApplication.class.getPackage().getImplementationVersion();
+        return new ApiInfoBuilder() //
+            .title("RIC Dashboard backend") //
+            .description("Proxies access to RIC services.")//
+            .termsOfServiceUrl("Terms of service") //
+            .contact(new Contact("RIC Dashboard Dev Team", //
+                "http://no-docs-yet.org/", //
+                "noreply@O-RAN-SC.org")) //
+            .license("Apache 2.0 License").licenseUrl("http://www.apache.org/licenses/LICENSE-2.0") //
+            .version(version == null ? "version not available" : version) //
+            .build();
+    }
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java
index 85a96d0..b43f8a9 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java
@@ -26,6 +26,7 @@
 
 import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.oransc.ric.portal.dashboard.DashboardUserManager;
+import org.oransc.ric.portal.dashboard.controller.PolicyController;
 import org.oransc.ric.portal.dashboard.controller.SimpleErrorController;
 import org.oransc.ric.portal.dashboard.portalapi.PortalAuthManager;
 import org.oransc.ric.portal.dashboard.portalapi.PortalAuthenticationFilter;
@@ -43,7 +44,6 @@
 import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
 import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
 import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
-import org.oransc.ric.portal.dashboard.controller.PolicyController;
 
 @Configuration
 @EnableWebSecurity
@@ -51,77 +51,77 @@
 @Profile("!test")
 public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// Although constructor arguments are recommended over field injection,
-	// this results in fewer lines of code.
-	@Value("${portalapi.security}")
-	private Boolean portalapiSecurity;
-	@Value("${portalapi.appname}")
-	private String appName;
-	@Value("${portalapi.username}")
-	private String userName;
-	@Value("${portalapi.password}")
-	private String password;
-	@Value("${portalapi.decryptor}")
-	private String decryptor;
-	@Value("${portalapi.usercookie}")
-	private String userCookie;
+    // Although constructor arguments are recommended over field injection,
+    // this results in fewer lines of code.
+    @Value("${portalapi.security}")
+    private Boolean portalapiSecurity;
+    @Value("${portalapi.appname}")
+    private String appName;
+    @Value("${portalapi.username}")
+    private String userName;
+    @Value("${portalapi.password}")
+    private String password;
+    @Value("${portalapi.decryptor}")
+    private String decryptor;
+    @Value("${portalapi.usercookie}")
+    private String userCookie;
 
-	@Autowired
-	DashboardUserManager userManager;
+    @Autowired
+    DashboardUserManager userManager;
 
-	@Override
-	protected void configure(HttpSecurity http) throws Exception {
-		logger.debug("configure: portalapi.username {}", userName);
-		// A chain of ".and()" always baffles me
-		http.authorizeRequests().anyRequest().authenticated();
-		http.headers().frameOptions().disable();
-		http.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
-		http.addFilterBefore(portalAuthenticationFilterBean(), BasicAuthenticationFilter.class);
-	}
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        logger.debug("configure: portalapi.username {}", userName);
+        // A chain of ".and()" always baffles me
+        http.authorizeRequests().anyRequest().authenticated();
+        http.headers().frameOptions().disable();
+        http.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
+        http.addFilterBefore(portalAuthenticationFilterBean(), BasicAuthenticationFilter.class);
+    }
 
-	/**
-	 * Resource paths that do not require authentication, especially including
-	 * Swagger-generated documentation.
-	 */
-	public static final String[] OPEN_PATHS = { //
-			"/v2/api-docs", //
-			"/swagger-resources/**", //
-			"/swagger-ui.html", //
-			"/webjars/**", //
-			PortalApiConstants.API_PREFIX + "/**", //
-			PolicyController.CONTROLLER_PATH + "/" + PolicyController.VERSION_METHOD, //
-			SimpleErrorController.ERROR_PATH };
+    /**
+     * Resource paths that do not require authentication, especially including
+     * Swagger-generated documentation.
+     */
+    public static final String[] OPEN_PATHS = { //
+        "/v2/api-docs", //
+        "/swagger-resources/**", //
+        "/swagger-ui.html", //
+        "/webjars/**", //
+        PortalApiConstants.API_PREFIX + "/**", //
+        PolicyController.CONTROLLER_PATH + "/" + PolicyController.VERSION_METHOD, //
+        SimpleErrorController.ERROR_PATH};
 
-	@Override
-	public void configure(WebSecurity web) throws Exception {
-		// This disables Spring security, but not the app's filter.
-		web.ignoring().antMatchers(OPEN_PATHS);
-	}
+    @Override
+    public void configure(WebSecurity web) throws Exception {
+        // This disables Spring security, but not the app's filter.
+        web.ignoring().antMatchers(OPEN_PATHS);
+    }
 
-	@Bean
-	public PortalAuthManager portalAuthManagerBean()
-			throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException,
-			IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
-		return new PortalAuthManager(appName, userName, password, decryptor, userCookie);
-	}
+    @Bean
+    public PortalAuthManager portalAuthManagerBean()
+        throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException,
+        IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
+        return new PortalAuthManager(appName, userName, password, decryptor, userCookie);
+    }
 
-	/*
-	 * If this is annotated with @Bean, it is created automatically AND REGISTERED,
-	 * and Spring processes annotations in the source of the class. However, the
-	 * filter is added in the chain apparently in the wrong order. Alternately, with
-	 * no @Bean and added to the chain up in the configure() method in the desired
-	 * order, the ignoring() matcher pattern configured above causes Spring to
-	 * bypass this filter, which seems to me means the filter participates
-	 * correctly.
-	 */
-	public PortalAuthenticationFilter portalAuthenticationFilterBean()
-			throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException,
-			IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
-		PortalAuthenticationFilter portalAuthenticationFilter = new PortalAuthenticationFilter(portalapiSecurity,
-				portalAuthManagerBean(), this.userManager);
-		return portalAuthenticationFilter;
-	}
+    /*
+     * If this is annotated with @Bean, it is created automatically AND REGISTERED,
+     * and Spring processes annotations in the source of the class. However, the
+     * filter is added in the chain apparently in the wrong order. Alternately, with
+     * no @Bean and added to the chain up in the configure() method in the desired
+     * order, the ignoring() matcher pattern configured above causes Spring to
+     * bypass this filter, which seems to me means the filter participates
+     * correctly.
+     */
+    public PortalAuthenticationFilter portalAuthenticationFilterBean()
+        throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException,
+        IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
+        PortalAuthenticationFilter portalAuthenticationFilter =
+            new PortalAuthenticationFilter(portalapiSecurity, portalAuthManagerBean(), this.userManager);
+        return portalAuthenticationFilter;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomResponseEntityExceptionHandler.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomResponseEntityExceptionHandler.java
index f5ecd10..52a51fb 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomResponseEntityExceptionHandler.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CustomResponseEntityExceptionHandler.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
 /**
  * Catches certain exceptions. This controller advice factors out try-catch
  * blocks in many controller methods.
- * 
+ *
  * Also see:<br>
  * https://www.baeldung.com/exception-handling-for-rest-with-spring
  * https://www.springboottutorial.com/spring-boot-exception-handling-for-rest-services
@@ -44,39 +44,39 @@
 @ControllerAdvice
 public class CustomResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
 
-	// Superclass has "logger" that is exposed here, so use a different name
-	private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    // Superclass has "logger" that is exposed here, so use a different name
+    private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	/**
-	 * Logs the error and generates a JSON response when a REST controller method
-	 * takes a RestClientResponseException. This is thrown by the Http client when a
-	 * remote method returns a non-2xx code. All the controller methods are proxies
-	 * in that they just forward the request along to a remote system, so if that
-	 * remote system fails, return 502 plus some details about the failure, rather
-	 * than the generic 500 that Spring-Boot will return on an uncaught exception.
-	 * 
-	 * Why 502? I quote: <blockquote>HTTP server received an invalid response from a
-	 * server it consulted when acting as a proxy or gateway.</blockquote>
-	 * 
-	 * @param ex
-	 *                    The exception
-	 * 
-	 * @param request
-	 *                    The original request
-	 * 
-	 * @return A response entity with status code 502 plus some details in the body.
-	 */
-	@ExceptionHandler({ RestClientResponseException.class })
-	public final ResponseEntity<ErrorTransport> handleProxyMethodException(Exception ex, WebRequest request) {
-		// Capture the full stack trace in the log.
-		log.error("handleProxyMethodException: request {}, exception {}", request.getDescription(false), ex);
-		if (ex instanceof HttpStatusCodeException) {
-			HttpStatusCodeException hsce = (HttpStatusCodeException) ex;
-			return new ResponseEntity<>(new ErrorTransport(hsce.getRawStatusCode(), hsce.getResponseBodyAsString(),
-					ex.toString(), request.getDescription(false)), HttpStatus.BAD_GATEWAY);
-		} else {
-			return new ResponseEntity<>(new ErrorTransport(500, ex), HttpStatus.BAD_GATEWAY);
-		}
-	}
+    /**
+     * Logs the error and generates a JSON response when a REST controller method
+     * takes a RestClientResponseException. This is thrown by the Http client when a
+     * remote method returns a non-2xx code. All the controller methods are proxies
+     * in that they just forward the request along to a remote system, so if that
+     * remote system fails, return 502 plus some details about the failure, rather
+     * than the generic 500 that Spring-Boot will return on an uncaught exception.
+     *
+     * Why 502? I quote: <blockquote>HTTP server received an invalid response from a
+     * server it consulted when acting as a proxy or gateway.</blockquote>
+     *
+     * @param ex
+     *        The exception
+     *
+     * @param request
+     *        The original request
+     *
+     * @return A response entity with status code 502 plus some details in the body.
+     */
+    @ExceptionHandler({RestClientResponseException.class})
+    public final ResponseEntity<ErrorTransport> handleProxyMethodException(Exception ex, WebRequest request) {
+        // Capture the full stack trace in the log.
+        log.error("handleProxyMethodException: request {}, exception {}", request.getDescription(false), ex);
+        if (ex instanceof HttpStatusCodeException) {
+            HttpStatusCodeException hsce = (HttpStatusCodeException) ex;
+            return new ResponseEntity<>(new ErrorTransport(hsce.getRawStatusCode(), hsce.getResponseBodyAsString(),
+                ex.toString(), request.getDescription(false)), HttpStatus.BAD_GATEWAY);
+        } else {
+            return new ResponseEntity<>(new ErrorTransport(500, ex), HttpStatus.BAD_GATEWAY);
+        }
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/Html5PathsController.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/Html5PathsController.java
index 7fb6e67..5d80538 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/Html5PathsController.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/Html5PathsController.java
@@ -8,9 +8,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,30 +39,31 @@
 @Controller
 public class Html5PathsController {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	/**
-	 * Forwards the browser to the index (main) page upon request of a known route.
-	 * This unfortunately requires duplication of the Angular route strings in the
-	 * path mappings on this method. Could switch to a regex pattern instead someday
-	 * if the routes change too often.
-	 * 
-	 * https://stackoverflow.com/questions/44692781/configure-spring-boot-to-redirect-404-to-a-single-page-app
-	 * 
-	 * @param request
-	 *                     HttpServletRequest
-	 * @param response
-	 *                     HttpServletResponse
-	 * @throws IOException
-	 *                         On error
-	 */
-	@RequestMapping(method = { RequestMethod.OPTIONS, RequestMethod.GET }, //
-			path = { "/policy", "/user" })
-	public void forwardAngularRoutes(HttpServletRequest request, HttpServletResponse response) throws IOException {
-		URL url = new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/index.html");
-		if (logger.isDebugEnabled())
-			logger.debug("forwardAngularRoutes: {} redirected to {}", request.getRequestURI(), url);
-		response.sendRedirect(url.toString());
-	}
+    /**
+     * Forwards the browser to the index (main) page upon request of a known route.
+     * This unfortunately requires duplication of the Angular route strings in the
+     * path mappings on this method. Could switch to a regex pattern instead someday
+     * if the routes change too often.
+     *
+     * https://stackoverflow.com/questions/44692781/configure-spring-boot-to-redirect-404-to-a-single-page-app
+     *
+     * @param request
+     *        HttpServletRequest
+     * @param response
+     *        HttpServletResponse
+     * @throws IOException
+     *         On error
+     */
+    @RequestMapping(
+        method = {RequestMethod.OPTIONS, RequestMethod.GET}, //
+        path = {"/policy", "/user"})
+    public void forwardAngularRoutes(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        URL url = new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/index.html");
+        if (logger.isDebugEnabled())
+            logger.debug("forwardAngularRoutes: {} redirected to {}", request.getRequestURI(), url);
+        response.sendRedirect(url.toString());
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/PolicyController.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/PolicyController.java
index 529cd2a..5b90931 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/PolicyController.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/PolicyController.java
@@ -19,14 +19,16 @@
  */
 package org.oransc.ric.portal.dashboard.controller;
 
-import java.lang.invoke.MethodHandles;
-
-import javax.servlet.http.HttpServletResponse;
-
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 
-import org.oransc.ric.portal.dashboard.DashboardApplication;
+import io.swagger.annotations.ApiOperation;
+
+import java.lang.invoke.MethodHandles;
+import java.util.Collection;
+
+import javax.servlet.http.HttpServletResponse;
+
 import org.oransc.ric.portal.dashboard.DashboardConstants;
 import org.oransc.ric.portal.dashboard.exceptions.HttpBadRequestException;
 import org.oransc.ric.portal.dashboard.exceptions.HttpInternalServerErrorException;
@@ -34,7 +36,6 @@
 import org.oransc.ric.portal.dashboard.exceptions.HttpNotImplementedException;
 import org.oransc.ric.portal.dashboard.model.PolicyInstances;
 import org.oransc.ric.portal.dashboard.model.PolicyTypes;
-import org.oransc.ric.portal.dashboard.model.SuccessTransport;
 import org.oransc.ric.portal.dashboard.policyagentapi.PolicyAgentApi;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,8 +53,6 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-import java.util.Collection;
-import io.swagger.annotations.ApiOperation;
 
 /**
  * Proxies calls from the front end to the Policy agent API.
@@ -67,117 +66,117 @@
 @RequestMapping(value = PolicyController.CONTROLLER_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
 public class PolicyController {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-	private static Gson gson = new GsonBuilder() //
-			.serializeNulls() //
-			.create(); //
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static Gson gson = new GsonBuilder() //
+        .serializeNulls() //
+        .create(); //
 
-	// Publish paths in constants so tests are easy to write
-	public static final String CONTROLLER_PATH = DashboardConstants.ENDPOINT_PREFIX + "/policy";
-	// Endpoints
-	public static final String VERSION_METHOD = DashboardConstants.VERSION_METHOD;
-	public static final String POLICY_TYPES_METHOD = "policytypes";
-	public static final String POLICY_TYPE_ID_NAME = "policy_type_id";
-	public static final String POLICIES_NAME = "policies";
-	public static final String POLICY_INSTANCE_ID_NAME = "policy_instance_id";
+    // Publish paths in constants so tests are easy to write
+    public static final String CONTROLLER_PATH = DashboardConstants.ENDPOINT_PREFIX + "/policy";
+    // Endpoints
+    public static final String VERSION_METHOD = DashboardConstants.VERSION_METHOD;
+    public static final String POLICY_TYPES_METHOD = "policytypes";
+    public static final String POLICY_TYPE_ID_NAME = "policy_type_id";
+    public static final String POLICIES_NAME = "policies";
+    public static final String POLICY_INSTANCE_ID_NAME = "policy_instance_id";
 
-	// Populated by the autowired constructor
-	private final PolicyAgentApi policyAgentApi;
+    // Populated by the autowired constructor
+    private final PolicyAgentApi policyAgentApi;
 
-	@Autowired
-	public PolicyController(final PolicyAgentApi policyAgentApi) {
-		Assert.notNull(policyAgentApi, "API must not be null");
-		this.policyAgentApi = policyAgentApi;
-		logger.debug("ctor: configured with client type {}", policyAgentApi.getClass().getName());
-	}
+    @Autowired
+    public PolicyController(final PolicyAgentApi policyAgentApi) {
+        Assert.notNull(policyAgentApi, "API must not be null");
+        this.policyAgentApi = policyAgentApi;
+        logger.debug("ctor: configured with client type {}", policyAgentApi.getClass().getName());
+    }
 
-	/*
-	 * The fields are defined in the Policy Control Typescript interface.
-	 */
-	@ApiOperation(value = "Gets the policy types from Near Realtime-RIC")
-	@GetMapping(POLICY_TYPES_METHOD)
-	@Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-	public ResponseEntity<PolicyTypes> getAllPolicyTypes(HttpServletResponse response) {
-		logger.debug("getAllPolicyTypes");
-		return this.policyAgentApi.getAllPolicyTypes();
-	}
+    /*
+     * The fields are defined in the Policy Control Typescript interface.
+     */
+    @ApiOperation(value = "Gets the policy types from Near Realtime-RIC")
+    @GetMapping(POLICY_TYPES_METHOD)
+    @Secured({DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD})
+    public ResponseEntity<PolicyTypes> getAllPolicyTypes(HttpServletResponse response) {
+        logger.debug("getAllPolicyTypes");
+        return this.policyAgentApi.getAllPolicyTypes();
+    }
 
-	@ApiOperation(value = "Returns the policy instances for the given policy type.")
-	@GetMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME)
-	@Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-	public ResponseEntity<String> getPolicyInstances(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString) {
-		logger.debug("getPolicyInstances {}", policyTypeIdString);
+    @ApiOperation(value = "Returns the policy instances for the given policy type.")
+    @GetMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME)
+    @Secured({DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD})
+    public ResponseEntity<String> getPolicyInstances(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString) {
+        logger.debug("getPolicyInstances {}", policyTypeIdString);
 
-		ResponseEntity<PolicyInstances> response = this.policyAgentApi.getPolicyInstancesForType(policyTypeIdString);
-		if (!response.getStatusCode().is2xxSuccessful()) {
-			return new ResponseEntity<>(response.getStatusCode());
-		}
-		String json = gson.toJson(response.getBody());
-		return new ResponseEntity<>(json, response.getStatusCode());
-	}
+        ResponseEntity<PolicyInstances> response = this.policyAgentApi.getPolicyInstancesForType(policyTypeIdString);
+        if (!response.getStatusCode().is2xxSuccessful()) {
+            return new ResponseEntity<>(response.getStatusCode());
+        }
+        String json = gson.toJson(response.getBody());
+        return new ResponseEntity<>(json, response.getStatusCode());
+    }
 
-	@ApiOperation(value = "Returns a policy instance of a type")
-	@GetMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{" + POLICY_INSTANCE_ID_NAME
-			+ "}")
-	@Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-	public ResponseEntity<String> getPolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
-			@PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId) {
-		logger.debug("getPolicyInstance {}:{}", policyTypeIdString, policyInstanceId);
-		return this.policyAgentApi.getPolicyInstance(policyInstanceId);
-	}
+    @ApiOperation(value = "Returns a policy instance of a type")
+    @GetMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{" + POLICY_INSTANCE_ID_NAME
+        + "}")
+    @Secured({DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD})
+    public ResponseEntity<String> getPolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
+        @PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId) {
+        logger.debug("getPolicyInstance {}:{}", policyTypeIdString, policyInstanceId);
+        return this.policyAgentApi.getPolicyInstance(policyInstanceId);
+    }
 
-	@ApiOperation(value = "Creates the policy instances for the given policy type.")
-	@PutMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{" + POLICY_INSTANCE_ID_NAME
-			+ "}")
-	@Secured({ DashboardConstants.ROLE_ADMIN })
-	public ResponseEntity<String> putPolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
-			@RequestParam(name = "ric", required = true) String ric,
-			@PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId, @RequestBody String instance) {
-		logger.debug("putPolicyInstance typeId: {}, instanceId: {}, instance: {}", policyTypeIdString, policyInstanceId,
-				instance);
-		return this.policyAgentApi.putPolicy(policyTypeIdString, policyInstanceId, instance, ric);
-	}
+    @ApiOperation(value = "Creates the policy instances for the given policy type.")
+    @PutMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{" + POLICY_INSTANCE_ID_NAME
+        + "}")
+    @Secured({DashboardConstants.ROLE_ADMIN})
+    public ResponseEntity<String> putPolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
+        @RequestParam(name = "ric", required = true) String ric,
+        @PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId, @RequestBody String instance) {
+        logger.debug("putPolicyInstance typeId: {}, instanceId: {}, instance: {}", policyTypeIdString, policyInstanceId,
+            instance);
+        return this.policyAgentApi.putPolicy(policyTypeIdString, policyInstanceId, instance, ric);
+    }
 
-	@ApiOperation(value = "Deletes the policy instances for the given policy type.")
-	@DeleteMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{"
-			+ POLICY_INSTANCE_ID_NAME + "}")
-	@Secured({ DashboardConstants.ROLE_ADMIN })
-	public void deletePolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
-			@PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId) {
-		logger.debug("deletePolicyInstance typeId: {}, instanceId: {}", policyTypeIdString, policyInstanceId);
-		this.policyAgentApi.deletePolicy(policyInstanceId);
-	}
+    @ApiOperation(value = "Deletes the policy instances for the given policy type.")
+    @DeleteMapping(POLICY_TYPES_METHOD + "/{" + POLICY_TYPE_ID_NAME + "}/" + POLICIES_NAME + "/{"
+        + POLICY_INSTANCE_ID_NAME + "}")
+    @Secured({DashboardConstants.ROLE_ADMIN})
+    public void deletePolicyInstance(@PathVariable(POLICY_TYPE_ID_NAME) String policyTypeIdString,
+        @PathVariable(POLICY_INSTANCE_ID_NAME) String policyInstanceId) {
+        logger.debug("deletePolicyInstance typeId: {}, instanceId: {}", policyTypeIdString, policyInstanceId);
+        this.policyAgentApi.deletePolicy(policyInstanceId);
+    }
 
-	private void checkHttpError(String httpCode) {
-		logger.debug("Http Response Code: {}", httpCode);
-		if (httpCode.equals(String.valueOf(HttpStatus.NOT_FOUND.value()))) {
-			logger.error("Caught HttpNotFoundException");
-			throw new HttpNotFoundException("Not Found Exception");
-		} else if (httpCode.equals(String.valueOf(HttpStatus.BAD_REQUEST.value()))) {
-			logger.error("Caught HttpBadRequestException");
-			throw new HttpBadRequestException("Bad Request Exception");
-		} else if (httpCode.equals(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR.value()))) {
-			logger.error("Caught HttpInternalServerErrorException");
-			throw new HttpInternalServerErrorException("Internal Server Error Exception");
-		} else if (httpCode.equals(String.valueOf(HttpStatus.NOT_IMPLEMENTED.value()))) {
-			logger.error("Caught HttpNotImplementedException");
-			throw new HttpNotImplementedException("Not Implemented Exception");
-		}
-	}
+    private void checkHttpError(String httpCode) {
+        logger.debug("Http Response Code: {}", httpCode);
+        if (httpCode.equals(String.valueOf(HttpStatus.NOT_FOUND.value()))) {
+            logger.error("Caught HttpNotFoundException");
+            throw new HttpNotFoundException("Not Found Exception");
+        } else if (httpCode.equals(String.valueOf(HttpStatus.BAD_REQUEST.value()))) {
+            logger.error("Caught HttpBadRequestException");
+            throw new HttpBadRequestException("Bad Request Exception");
+        } else if (httpCode.equals(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR.value()))) {
+            logger.error("Caught HttpInternalServerErrorException");
+            throw new HttpInternalServerErrorException("Internal Server Error Exception");
+        } else if (httpCode.equals(String.valueOf(HttpStatus.NOT_IMPLEMENTED.value()))) {
+            logger.error("Caught HttpNotImplementedException");
+            throw new HttpNotImplementedException("Not Implemented Exception");
+        }
+    }
 
-	@ApiOperation(value = "Returns the rics supporting the given policy type.")
-	@GetMapping("/rics")
-	@Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-	public ResponseEntity<String> getRicsSupportingType(
-			@RequestParam(name = "policyType", required = true) String supportingPolicyType) {
-		logger.debug("getRicsSupportingType {}", supportingPolicyType);
+    @ApiOperation(value = "Returns the rics supporting the given policy type.")
+    @GetMapping("/rics")
+    @Secured({DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD})
+    public ResponseEntity<String> getRicsSupportingType(
+        @RequestParam(name = "policyType", required = true) String supportingPolicyType) {
+        logger.debug("getRicsSupportingType {}", supportingPolicyType);
 
-		ResponseEntity<Collection<String>> result = this.policyAgentApi.getRicsSupportingType(supportingPolicyType);
-		if (!result.getStatusCode().is2xxSuccessful()) {
-			return new ResponseEntity<>(result.getStatusCode());
-		}
-		String json = gson.toJson(result.getBody());
-		return new ResponseEntity<>(json, result.getStatusCode());
-	}
+        ResponseEntity<Collection<String>> result = this.policyAgentApi.getRicsSupportingType(supportingPolicyType);
+        if (!result.getStatusCode().is2xxSuccessful()) {
+            return new ResponseEntity<>(result.getStatusCode());
+        }
+        String json = gson.toJson(result.getBody());
+        return new ResponseEntity<>(json, result.getStatusCode());
+    }
 
 };
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/SimpleErrorController.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/SimpleErrorController.java
index e2248e6..63b78ec 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/SimpleErrorController.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/SimpleErrorController.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,6 @@
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.context.request.ServletWebRequest;
-
 import springfox.documentation.annotations.ApiIgnore;
 
 /**
@@ -43,12 +42,12 @@
  * context, including page not found, and redirects the caller to a custom error
  * page. The caller is also redirected to this page if a REST controller takes
  * an uncaught exception.
- * 
+ *
  * If trace is requested via request parameter ("?trace=true") and available,
  * adds stack trace information to the standard JSON error response.
- * 
+ *
  * Excluded from Swagger API documentation.
- * 
+ *
  * https://stackoverflow.com/questions/25356781/spring-boot-remove-whitelabel-error-page
  * https://www.baeldung.com/spring-boot-custom-error-page
  */
@@ -58,36 +57,36 @@
 @RequestMapping(value = SimpleErrorController.ERROR_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
 public class SimpleErrorController implements ErrorController {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	public static final String ERROR_PATH = "/error";
+    public static final String ERROR_PATH = "/error";
 
-	private final ErrorAttributes errorAttributes;
+    private final ErrorAttributes errorAttributes;
 
-	@Autowired
-	public SimpleErrorController(ErrorAttributes errorAttributes) {
-		this.errorAttributes = errorAttributes;
-	}
+    @Autowired
+    public SimpleErrorController(ErrorAttributes errorAttributes) {
+        this.errorAttributes = errorAttributes;
+    }
 
-	@Override
-	public String getErrorPath() {
-		logger.warn("getErrorPath");
-		return ERROR_PATH;
-	}
+    @Override
+    public String getErrorPath() {
+        logger.warn("getErrorPath");
+        return ERROR_PATH;
+    }
 
-	@GetMapping
-	public String handleError(HttpServletRequest request) {
-		ServletWebRequest servletWebRequest = new ServletWebRequest(request);
-		Throwable t = errorAttributes.getError(servletWebRequest);
-		if (t != null)
-			logger.warn("handleError", t);
-		Map<String, Object> attributes = errorAttributes.getErrorAttributes(servletWebRequest, true);
-		attributes.forEach((attribute, value) -> {
-			logger.warn("handleError: {} -> {}", attribute, value);
-		});
-		// Return the name of the page INCLUDING suffix, which I guess is a "view" name.
-		// Just "error" is not enough, but don't seem to need a ModelAndView object.
-		return "error.html";
-	}
+    @GetMapping
+    public String handleError(HttpServletRequest request) {
+        ServletWebRequest servletWebRequest = new ServletWebRequest(request);
+        Throwable t = errorAttributes.getError(servletWebRequest);
+        if (t != null)
+            logger.warn("handleError", t);
+        Map<String, Object> attributes = errorAttributes.getErrorAttributes(servletWebRequest, true);
+        attributes.forEach((attribute, value) -> {
+            logger.warn("handleError: {} -> {}", attribute, value);
+        });
+        // Return the name of the page INCLUDING suffix, which I guess is a "view" name.
+        // Just "error" is not enough, but don't seem to need a ModelAndView object.
+        return "error.html";
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/k8sapi/SimpleKubernetesClient.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/k8sapi/SimpleKubernetesClient.java
index bcfae62..d3add60 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/k8sapi/SimpleKubernetesClient.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/k8sapi/SimpleKubernetesClient.java
@@ -34,23 +34,22 @@
  */
 public class SimpleKubernetesClient {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	private final String k8sUrl;
+    private final String k8sUrl;
 
-	public SimpleKubernetesClient(String baseUrl) {
-		logger.debug("ctor: baseUrl {}", baseUrl);
-		k8sUrl = baseUrl;
-	}
+    public SimpleKubernetesClient(String baseUrl) {
+        logger.debug("ctor: baseUrl {}", baseUrl);
+        k8sUrl = baseUrl;
+    }
 
-	public String listPods(String namespace) {
-		logger.debug("listPods for namespace {}", namespace);
-		String podsUrl = new DefaultUriBuilderFactory(k8sUrl.trim()).builder().pathSegment("v1")
-				.pathSegment("namespaces").pathSegment(namespace.trim()).pathSegment("pods").build().normalize()
-				.toString();
-		RestTemplate rt = new RestTemplate();
-		ResponseEntity<String> podsResponse = rt.getForEntity(podsUrl, String.class);
-		return podsResponse.getBody();
-	}
+    public String listPods(String namespace) {
+        logger.debug("listPods for namespace {}", namespace);
+        String podsUrl = new DefaultUriBuilderFactory(k8sUrl.trim()).builder().pathSegment("v1")
+            .pathSegment("namespaces").pathSegment(namespace.trim()).pathSegment("pods").build().normalize().toString();
+        RestTemplate rt = new RestTemplate();
+        ResponseEntity<String> podsResponse = rt.getForEntity(podsUrl, String.class);
+        return podsResponse.getBody();
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/EcompUserDetails.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/EcompUserDetails.java
index 7bc9f00..3a08206 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/EcompUserDetails.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/EcompUserDetails.java
@@ -32,54 +32,54 @@
 
 public class EcompUserDetails implements UserDetails {
 
-	private static final long serialVersionUID = 1L;
-	private final EcompUser ecompUser;
+    private static final long serialVersionUID = 1L;
+    private final EcompUser ecompUser;
 
-	// This is the default Spring role-name prefix.
-	private static final String ROLEP = "ROLE_";
+    // This is the default Spring role-name prefix.
+    private static final String ROLEP = "ROLE_";
 
-	public EcompUserDetails(EcompUser ecompUser) {
-		this.ecompUser = ecompUser;
-	}
+    public EcompUserDetails(EcompUser ecompUser) {
+        this.ecompUser = ecompUser;
+    }
 
-	/*
-	 * Gets a list of authorities (roles) for this user. To keep Spring happy, every
-	 * item has prefix ROLE_.
-	 */
-	public Collection<? extends GrantedAuthority> getAuthorities() {
-		List<GrantedAuthority> roleList = new ArrayList<>();
-		Iterator<EcompRole> roleIter = ecompUser.getRoles().iterator();
-		while (roleIter.hasNext()) {
-			EcompRole role = roleIter.next();
-			// Add the prefix if the ONAP portal doesn't supply it.
-			final String roleName = role.getName().startsWith(ROLEP) ? role.getName() : ROLEP + role.getName();
-			roleList.add(new SimpleGrantedAuthority(roleName));
-		}
-		return roleList;
-	}
+    /*
+     * Gets a list of authorities (roles) for this user. To keep Spring happy, every
+     * item has prefix ROLE_.
+     */
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        List<GrantedAuthority> roleList = new ArrayList<>();
+        Iterator<EcompRole> roleIter = ecompUser.getRoles().iterator();
+        while (roleIter.hasNext()) {
+            EcompRole role = roleIter.next();
+            // Add the prefix if the ONAP portal doesn't supply it.
+            final String roleName = role.getName().startsWith(ROLEP) ? role.getName() : ROLEP + role.getName();
+            roleList.add(new SimpleGrantedAuthority(roleName));
+        }
+        return roleList;
+    }
 
-	public String getPassword() {
-		return null;
-	}
+    public String getPassword() {
+        return null;
+    }
 
-	public String getUsername() {
-		return ecompUser.getLoginId();
-	}
+    public String getUsername() {
+        return ecompUser.getLoginId();
+    }
 
-	public boolean isAccountNonExpired() {
-		return true;
-	}
+    public boolean isAccountNonExpired() {
+        return true;
+    }
 
-	public boolean isAccountNonLocked() {
-		return true;
-	}
+    public boolean isAccountNonLocked() {
+        return true;
+    }
 
-	public boolean isCredentialsNonExpired() {
-		return true;
-	}
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
 
-	public boolean isEnabled() {
-		return ecompUser.isActive();
-	}
+    public boolean isEnabled() {
+        return ecompUser.isActive();
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/ErrorTransport.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/ErrorTransport.java
index 516e3c8..f1250c1 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/ErrorTransport.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/ErrorTransport.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,106 +28,106 @@
  */
 public class ErrorTransport implements IDashboardResponse {
 
-	private Instant timestamp;
-	private Integer status;
-	private String error;
-	private String message;
-	private String path;
+    private Instant timestamp;
+    private Integer status;
+    private String error;
+    private String message;
+    private String path;
 
-	/**
-	 * Builds an empty object.
-	 */
-	public ErrorTransport() {
-		// no-arg constructor
-	}
+    /**
+     * Builds an empty object.
+     */
+    public ErrorTransport() {
+        // no-arg constructor
+    }
 
-	/**
-	 * Convenience constructor for minimal value set.
-	 * 
-	 * @param status
-	 *                   Integer value like 400
-	 * @param error
-	 *                   Error message
-	 */
-	public ErrorTransport(int status, String error) {
-		this(status, error, null, null);
-	}
+    /**
+     * Convenience constructor for minimal value set.
+     *
+     * @param status
+     *        Integer value like 400
+     * @param error
+     *        Error message
+     */
+    public ErrorTransport(int status, String error) {
+        this(status, error, null, null);
+    }
 
-	/**
-	 * Convenience constructor for populating an error from an exception
-	 * 
-	 * @param status
-	 *                      Integer value like 400
-	 * @param throwable
-	 *                      The caught exception/throwable to convert to String with
-	 *                      an upper bound on characters
-	 */
-	public ErrorTransport(int status, Throwable throwable) {
-		this.timestamp = Instant.now();
-		this.status = status;
-		final int enough = 256;
-		String exString = throwable.toString();
-		this.error = exString.length() > enough ? exString.substring(0, enough) : exString;
-	}
+    /**
+     * Convenience constructor for populating an error from an exception
+     *
+     * @param status
+     *        Integer value like 400
+     * @param throwable
+     *        The caught exception/throwable to convert to String with
+     *        an upper bound on characters
+     */
+    public ErrorTransport(int status, Throwable throwable) {
+        this.timestamp = Instant.now();
+        this.status = status;
+        final int enough = 256;
+        String exString = throwable.toString();
+        this.error = exString.length() > enough ? exString.substring(0, enough) : exString;
+    }
 
-	/**
-	 * Builds an object with all fields
-	 * 
-	 * @param status
-	 *                    Integer value like 500
-	 * @param error
-	 *                    Explanation
-	 * @param message
-	 *                    Additional explanation
-	 * @param path
-	 *                    Requested path
-	 */
-	public ErrorTransport(int status, String error, String message, String path) {
-		this.timestamp = Instant.now();
-		this.status = status;
-		this.error = error;
-		this.message = message;
-		this.path = path;
-	}
+    /**
+     * Builds an object with all fields
+     *
+     * @param status
+     *        Integer value like 500
+     * @param error
+     *        Explanation
+     * @param message
+     *        Additional explanation
+     * @param path
+     *        Requested path
+     */
+    public ErrorTransport(int status, String error, String message, String path) {
+        this.timestamp = Instant.now();
+        this.status = status;
+        this.error = error;
+        this.message = message;
+        this.path = path;
+    }
 
-	public Integer getStatus() {
-		return status;
-	}
+    public Integer getStatus() {
+        return status;
+    }
 
-	public void setStatus(Integer status) {
-		this.status = status;
-	}
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
 
-	public String getMessage() {
-		return message;
-	}
+    public String getMessage() {
+        return message;
+    }
 
-	public void setMessage(String error) {
-		this.message = error;
-	}
+    public void setMessage(String error) {
+        this.message = error;
+    }
 
-	public Instant getTimestamp() {
-		return timestamp;
-	}
+    public Instant getTimestamp() {
+        return timestamp;
+    }
 
-	public void setTimestamp(Instant timestamp) {
-		this.timestamp = timestamp;
-	}
+    public void setTimestamp(Instant timestamp) {
+        this.timestamp = timestamp;
+    }
 
-	public String getError() {
-		return error;
-	}
+    public String getError() {
+        return error;
+    }
 
-	public void setError(String error) {
-		this.error = error;
-	}
+    public void setError(String error) {
+        this.error = error;
+    }
 
-	public String getPath() {
-		return path;
-	}
+    public String getPath() {
+        return path;
+    }
 
-	public void setPath(String path) {
-		this.path = path;
-	}
+    public void setPath(String path) {
+        this.path = path;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInfo.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInfo.java
index ca1b79d..30cfd2a 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInfo.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInfo.java
@@ -26,16 +26,16 @@
 @Gson.TypeAdapters
 public interface PolicyInfo {
 
-	public String id();
+    public String id();
 
-	public String type();
+    public String type();
 
-	public String ric();
+    public String ric();
 
-	public String json();
+    public String json();
 
-	public String service();
+    public String service();
 
-	public String lastModified();
+    public String lastModified();
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInstances.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInstances.java
index eb6b455..c6faf9b 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInstances.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyInstances.java
@@ -23,6 +23,6 @@
 
 public class PolicyInstances extends ArrayList<PolicyInfo> {
 
-	private static final long serialVersionUID = -928428052502491021L;
+    private static final long serialVersionUID = -928428052502491021L;
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyType.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyType.java
index ea51cc5..f0ca285 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyType.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyType.java
@@ -23,35 +23,35 @@
 
 public class PolicyType {
 
-	@JsonProperty("name")
-	String name;
+    @JsonProperty("name")
+    String name;
 
-	@JsonProperty("schema")
-	String schema;
+    @JsonProperty("schema")
+    String schema;
 
-	public PolicyType(String name, String schema) {
-		this.name = name;
-		this.schema = schema;
-	}
+    public PolicyType(String name, String schema) {
+        this.name = name;
+        this.schema = schema;
+    }
 
-	public String getName() {
-		return name;
-	}
+    public String getName() {
+        return name;
+    }
 
-	public void setName(String name) {
-		this.name = name;
-	}
+    public void setName(String name) {
+        this.name = name;
+    }
 
-	public String getSchema() {
-		return schema;
-	}
+    public String getSchema() {
+        return schema;
+    }
 
-	public void setSchema(String schema) {
-		this.schema = schema;
-	}
+    public void setSchema(String schema) {
+        this.schema = schema;
+    }
 
-	@Override
-	public String toString() {
-		return "[name:" + name + ", schema:" + schema + "]";
-	}
+    @Override
+    public String toString() {
+        return "[name:" + name + ", schema:" + schema + "]";
+    }
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyTypes.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyTypes.java
index 3165d1b..43a6383 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyTypes.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/PolicyTypes.java
@@ -23,6 +23,6 @@
 
 public class PolicyTypes extends ArrayList<PolicyType> {
 
-	private static final long serialVersionUID = -928428052502491021L;
+    private static final long serialVersionUID = -928428052502491021L;
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/SuccessTransport.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/SuccessTransport.java
index 9e13789..65b39eb 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/SuccessTransport.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/model/SuccessTransport.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,43 +21,43 @@
 
 public class SuccessTransport implements IDashboardResponse {
 
-	private int status;
-	private Object data;
+    private int status;
+    private Object data;
 
-	/**
-	 * Builds an empty object
-	 */
-	public SuccessTransport() {
-		// no-arg constructor
-	}
+    /**
+     * Builds an empty object
+     */
+    public SuccessTransport() {
+        // no-arg constructor
+    }
 
-	/**
-	 * Builds an object with the specified values.
-	 * 
-	 * @param status
-	 *                   Status code
-	 * @param data
-	 *                   Data to transport
-	 */
-	public SuccessTransport(int status, Object data) {
-		this.status = status;
-		this.data = data;
-	}
+    /**
+     * Builds an object with the specified values.
+     *
+     * @param status
+     *        Status code
+     * @param data
+     *        Data to transport
+     */
+    public SuccessTransport(int status, Object data) {
+        this.status = status;
+        this.data = data;
+    }
 
-	public int getStatus() {
-		return status;
-	}
+    public int getStatus() {
+        return status;
+    }
 
-	public void setStatus(int status) {
-		this.status = status;
-	}
+    public void setStatus(int status) {
+        this.status = status;
+    }
 
-	public Object getData() {
-		return data;
-	}
+    public Object getData() {
+        return data;
+    }
 
-	public void setData(Object data) {
-		this.data = data;
-	}
+    public void setData(Object data) {
+        this.data = data;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApi.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApi.java
index 47add76..4a26563 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApi.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApi.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
     public ResponseEntity<String> getPolicyInstance(String id) throws RestClientException;
 
     public ResponseEntity<String> putPolicy(String policyTypeIdString, String policyInstanceId, String json, String ric)
-            throws RestClientException;
+        throws RestClientException;
 
     public void deletePolicy(String policyInstanceId) throws RestClientException;
 
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApiImpl.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApiImpl.java
index eb3f836..af814b9 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApiImpl.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/policyagentapi/PolicyAgentApiImpl.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,12 +19,29 @@
  */
 package org.oransc.ric.portal.dashboard.policyagentapi;
 
-import org.oransc.ric.portal.dashboard.DashboardConstants;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.reflect.TypeToken;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.immutables.gson.Gson;
+import org.immutables.value.Value;
 import org.oransc.ric.portal.dashboard.model.ImmutablePolicyInfo;
 import org.oransc.ric.portal.dashboard.model.PolicyInfo;
 import org.oransc.ric.portal.dashboard.model.PolicyInstances;
 import org.oransc.ric.portal.dashboard.model.PolicyType;
 import org.oransc.ric.portal.dashboard.model.PolicyTypes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -32,26 +49,6 @@
 import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
 
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import java.lang.invoke.MethodHandles;
-import java.lang.reflect.Type;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import com.google.gson.annotations.SerializedName;
-import com.google.gson.reflect.TypeToken;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.immutables.gson.Gson;
-import org.immutables.value.Value;
-
 @Component("PolicyAgentApi")
 public class PolicyAgentApiImpl implements PolicyAgentApi {
     private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -59,14 +56,14 @@
     RestTemplate restTemplate = new RestTemplate();
 
     private static com.google.gson.Gson gson = new GsonBuilder() //
-            .serializeNulls() //
-            .create(); //
+        .serializeNulls() //
+        .create(); //
 
     private final String urlPrefix;
 
     @Autowired
     public PolicyAgentApiImpl(
-            @org.springframework.beans.factory.annotation.Value("${policycontroller.url.prefix}") final String urlPrefix) {
+        @org.springframework.beans.factory.annotation.Value("${policycontroller.url.prefix}") final String urlPrefix) {
         logger.debug("ctor prefix '{}'", urlPrefix);
         this.urlPrefix = urlPrefix;
     }
@@ -114,8 +111,7 @@
             return new ResponseEntity<>(rsp.getStatusCode());
         }
 
-        Type listType = new TypeToken<List<ImmutablePolicyInfo>>() {
-        }.getType();
+        Type listType = new TypeToken<List<ImmutablePolicyInfo>>() {}.getType();
         List<PolicyInfo> rspParsed = gson.fromJson(rsp.getBody(), listType);
 
         PolicyInstances result = new PolicyInstances();
@@ -135,13 +131,13 @@
 
     @Override
     public ResponseEntity<String> putPolicy(String policyTypeIdString, String policyInstanceId, String json, String ric)
-            throws RestClientException {
+        throws RestClientException {
         String url = baseUrl() + "/policy?type={type}&instance={instance}&ric={ric}&service={service}";
         Map<String, ?> uriVariables = Map.of( //
-                "type", policyTypeIdString, //
-                "instance", policyInstanceId, //
-                "ric", ric, //
-                "service", "dashboard");
+            "type", policyTypeIdString, //
+            "instance", policyInstanceId, //
+            "ric", ric, //
+            "service", "dashboard");
 
         try {
             this.restTemplate.put(url, json, uriVariables);
@@ -174,8 +170,7 @@
         Map<String, ?> uriVariables = Map.of("typeName", typeName);
         String rsp = this.restTemplate.getForObject(url, String.class, uriVariables);
 
-        Type listType = new TypeToken<List<ImmutableRicInfo>>() {
-        }.getType();
+        Type listType = new TypeToken<List<ImmutableRicInfo>>() {}.getType();
         List<RicInfo> rspParsed = gson.fromJson(rsp, listType);
 
         Collection<String> result = new Vector<>(rspParsed.size());
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/IPortalSdkDecryptor.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/IPortalSdkDecryptor.java
index 34d80c9..552d783 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/IPortalSdkDecryptor.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/IPortalSdkDecryptor.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,15 +27,15 @@
  */
 public interface IPortalSdkDecryptor {
 
-	/**
-	 * Decrypts the specified value using a known key.
-	 * 
-	 * @param cipherText
-	 *                       Encrypted value
-	 * @return Clear text on success, null otherwise.
-	 * @throws CipherUtilException
-	 *                                 if any decryption step fails
-	 */
-	String decrypt(String cipherText) throws CipherUtilException;
+    /**
+     * Decrypts the specified value using a known key.
+     *
+     * @param cipherText
+     *        Encrypted value
+     * @return Clear text on success, null otherwise.
+     * @throws CipherUtilException
+     *         if any decryption step fails
+     */
+    String decrypt(String cipherText) throws CipherUtilException;
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java
index dc70f7e..f4daa5c 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,83 +38,83 @@
  */
 public class PortalAuthManager {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	final Map<String, String> credentialsMap;
-	private final IPortalSdkDecryptor portalSdkDecryptor;
-	private final String userIdCookieName;
+    final Map<String, String> credentialsMap;
+    private final IPortalSdkDecryptor portalSdkDecryptor;
+    private final String userIdCookieName;
 
-	public PortalAuthManager(final String appName, final String username, final String password,
-			final String decryptorClassName, final String userCookie)
-			throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException,
-			InvocationTargetException, NoSuchMethodException, SecurityException {
-		credentialsMap = new HashMap<>();
-		credentialsMap.put(IPortalRestCentralService.CREDENTIALS_APP, appName);
-		credentialsMap.put(IPortalRestCentralService.CREDENTIALS_USER, username);
-		credentialsMap.put(IPortalRestCentralService.CREDENTIALS_PASS, password);
-		this.userIdCookieName = userCookie;
-		// Instantiate here so configuration errors are detected at app-start time
-		logger.debug("ctor: using decryptor class {}", decryptorClassName);
-		Class<?> decryptorClass = Class.forName(decryptorClassName);
-		portalSdkDecryptor = (IPortalSdkDecryptor) decryptorClass.getDeclaredConstructor().newInstance();
-	}
+    public PortalAuthManager(final String appName, final String username, final String password,
+        final String decryptorClassName, final String userCookie)
+        throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException,
+        InvocationTargetException, NoSuchMethodException, SecurityException {
+        credentialsMap = new HashMap<>();
+        credentialsMap.put(IPortalRestCentralService.CREDENTIALS_APP, appName);
+        credentialsMap.put(IPortalRestCentralService.CREDENTIALS_USER, username);
+        credentialsMap.put(IPortalRestCentralService.CREDENTIALS_PASS, password);
+        this.userIdCookieName = userCookie;
+        // Instantiate here so configuration errors are detected at app-start time
+        logger.debug("ctor: using decryptor class {}", decryptorClassName);
+        Class<?> decryptorClass = Class.forName(decryptorClassName);
+        portalSdkDecryptor = (IPortalSdkDecryptor) decryptorClass.getDeclaredConstructor().newInstance();
+    }
 
-	/**
-	 * @return A map of key-value pairs with application name, user name and
-	 *         password.
-	 */
-	public Map<String, String> getAppCredentials() {
-		return credentialsMap;
-	}
+    /**
+     * @return A map of key-value pairs with application name, user name and
+     *         password.
+     */
+    public Map<String, String> getAppCredentials() {
+        return credentialsMap;
+    }
 
-	/**
-	 * Searches the request for a cookie with the specified name.
-	 *
-	 * @param request
-	 *                       HttpServletRequest
-	 * @param cookieName
-	 *                       Cookie name
-	 * @return Cookie, or null if not found.
-	 */
-	private Cookie getCookie(HttpServletRequest request, String cookieName) {
-		Cookie[] cookies = request.getCookies();
-		if (cookies != null)
-			for (Cookie cookie : cookies)
-				if (cookie.getName().equals(cookieName))
-					return cookie;
-		return null;
-	}
+    /**
+     * Searches the request for a cookie with the specified name.
+     *
+     * @param request
+     *        HttpServletRequest
+     * @param cookieName
+     *        Cookie name
+     * @return Cookie, or null if not found.
+     */
+    private Cookie getCookie(HttpServletRequest request, String cookieName) {
+        Cookie[] cookies = request.getCookies();
+        if (cookies != null)
+            for (Cookie cookie : cookies)
+                if (cookie.getName().equals(cookieName))
+                    return cookie;
+        return null;
+    }
 
-	/**
-	 * Validates whether the ECOMP Portal sign-on process has completed. Checks for
-	 * the ECOMP cookie first, then the user cookie.
-	 * 
-	 * @param request
-	 *                    HttpServletRequest
-	 * @return User ID if the ECOMP cookie is present and the sign-on process
-	 *         established a user ID; else null.
-	 */
-	public String validateEcompSso(HttpServletRequest request) {
-		// Check ECOMP Portal cookie
-		Cookie ep = getCookie(request, PortalApiConstants.EP_SERVICE);
-		if (ep == null) {
-			logger.debug("validateEcompSso: cookie not found: {}", PortalApiConstants.EP_SERVICE);
-			return null;
-		}
-		logger.trace("validateEcompSso: found cookie {}", PortalApiConstants.EP_SERVICE);
-		Cookie user = getCookie(request, userIdCookieName);
-		if (user == null) {
-			logger.debug("validateEcompSso: cookie not found: {}", userIdCookieName);
-			return null;
-		}
-		logger.trace("validateEcompSso: user cookie {}", userIdCookieName);
-		String userid = null;
-		try {
-			userid = portalSdkDecryptor.decrypt(user.getValue());
-		} catch (CipherUtilException e) {
-			throw new IllegalArgumentException("validateEcompSso failed", e);
-		}
-		return userid;
-	}
+    /**
+     * Validates whether the ECOMP Portal sign-on process has completed. Checks for
+     * the ECOMP cookie first, then the user cookie.
+     *
+     * @param request
+     *        HttpServletRequest
+     * @return User ID if the ECOMP cookie is present and the sign-on process
+     *         established a user ID; else null.
+     */
+    public String validateEcompSso(HttpServletRequest request) {
+        // Check ECOMP Portal cookie
+        Cookie ep = getCookie(request, PortalApiConstants.EP_SERVICE);
+        if (ep == null) {
+            logger.debug("validateEcompSso: cookie not found: {}", PortalApiConstants.EP_SERVICE);
+            return null;
+        }
+        logger.trace("validateEcompSso: found cookie {}", PortalApiConstants.EP_SERVICE);
+        Cookie user = getCookie(request, userIdCookieName);
+        if (user == null) {
+            logger.debug("validateEcompSso: cookie not found: {}", userIdCookieName);
+            return null;
+        }
+        logger.trace("validateEcompSso: user cookie {}", userIdCookieName);
+        String userid = null;
+        try {
+            userid = portalSdkDecryptor.decrypt(user.getValue());
+        } catch (CipherUtilException e) {
+            throw new IllegalArgumentException("validateEcompSso failed", e);
+        }
+        return userid;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthenticationFilter.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthenticationFilter.java
index 4b6de91..711761a 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthenticationFilter.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthenticationFilter.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -71,211 +71,211 @@
  * Portal knows where to forward the request to once the Portal Session is
  * created and EPService cookie is set.
  * </UL>
- * 
+ *
  * TODO: What about sessions? Will this be stateless?
- * 
+ *
  * This filter uses no annotations to avoid Spring's automatic registration,
  * which add this filter in the chain in the wrong order.
  */
 public class PortalAuthenticationFilter implements Filter {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// Unfortunately not all file names are defined as constants
-	private static final String[] securityPropertyFiles = { KeyProperties.PROPERTY_FILE_NAME,
-			PortalApiProperties.PROPERTY_FILE_NAME, DefaultSecurityConfiguration.DEFAULT_RESOURCE_FILE,
-			"validation.properties" };
+    // Unfortunately not all file names are defined as constants
+    private static final String[] securityPropertyFiles =
+        {KeyProperties.PROPERTY_FILE_NAME, PortalApiProperties.PROPERTY_FILE_NAME,
+            DefaultSecurityConfiguration.DEFAULT_RESOURCE_FILE, "validation.properties"};
 
-	public static final String REDIRECT_URL_KEY = "redirectUrl";
+    public static final String REDIRECT_URL_KEY = "redirectUrl";
 
-	private final boolean enforcePortalSecurity;
-	private final PortalAuthManager authManager;
+    private final boolean enforcePortalSecurity;
+    private final PortalAuthManager authManager;
 
-	private final DashboardUserManager userManager;
+    private final DashboardUserManager userManager;
 
-	public PortalAuthenticationFilter(boolean portalSecurity, PortalAuthManager authManager,
-			DashboardUserManager userManager) {
-		this.enforcePortalSecurity = portalSecurity;
-		this.authManager = authManager;
-		this.userManager = userManager;
-		if (portalSecurity) {
-			// Throw if security is requested and prerequisites are not met
-			for (String pf : securityPropertyFiles) {
-				InputStream in = MethodHandles.lookup().lookupClass().getClassLoader().getResourceAsStream(pf);
-				if (in == null) {
-					String msg = "Failed to find property file on classpath: " + pf;
-					logger.error(msg);
-					throw new RuntimeException(msg);
-				} else {
-					try {
-						in.close();
-					} catch (IOException ex) {
-						logger.warn("Failed to close stream", ex);
-					}
-				}
-			}
-		}
-	}
+    public PortalAuthenticationFilter(boolean portalSecurity, PortalAuthManager authManager,
+        DashboardUserManager userManager) {
+        this.enforcePortalSecurity = portalSecurity;
+        this.authManager = authManager;
+        this.userManager = userManager;
+        if (portalSecurity) {
+            // Throw if security is requested and prerequisites are not met
+            for (String pf : securityPropertyFiles) {
+                InputStream in = MethodHandles.lookup().lookupClass().getClassLoader().getResourceAsStream(pf);
+                if (in == null) {
+                    String msg = "Failed to find property file on classpath: " + pf;
+                    logger.error(msg);
+                    throw new RuntimeException(msg);
+                } else {
+                    try {
+                        in.close();
+                    } catch (IOException ex) {
+                        logger.warn("Failed to close stream", ex);
+                    }
+                }
+            }
+        }
+    }
 
-	@Override
-	public void init(FilterConfig filterConfig) throws ServletException {
-		// complain loudly if this key property is missing
-		String url = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
-		logger.debug("init: Portal redirect URL {}", url);
-		if (url == null)
-			logger.error(
-					"init: Failed to find property in portal.properties: " + PortalApiConstants.ECOMP_REDIRECT_URL);
-	}
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+        // complain loudly if this key property is missing
+        String url = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+        logger.debug("init: Portal redirect URL {}", url);
+        if (url == null)
+            logger
+                .error("init: Failed to find property in portal.properties: " + PortalApiConstants.ECOMP_REDIRECT_URL);
+    }
 
-	@Override
-	public void destroy() {
-		// No resources to release
-	}
+    @Override
+    public void destroy() {
+        // No resources to release
+    }
 
-	/**
-	 * Requests for pages ignored in the web security config do not hit this filter.
-	 */
-	@Override
-	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
-			throws IOException, ServletException {
-		if (enforcePortalSecurity)
-			doFilterEPSDKFW(req, res, chain);
-		else
-			doFilterMockUserAdminRole(req, res, chain);
-	}
+    /**
+     * Requests for pages ignored in the web security config do not hit this filter.
+     */
+    @Override
+    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
+        throws IOException, ServletException {
+        if (enforcePortalSecurity)
+            doFilterEPSDKFW(req, res, chain);
+        else
+            doFilterMockUserAdminRole(req, res, chain);
+    }
 
-	/*
-	 * Populates security context with a mock user in the admin role.
-	 * 
-	 */
-	private void doFilterMockUserAdminRole(ServletRequest req, ServletResponse res, FilterChain chain)
-			throws IOException, ServletException {
-		Authentication auth = SecurityContextHolder.getContext().getAuthentication();
-		if (auth == null || auth.getAuthorities().isEmpty()) {
-			if (logger.isDebugEnabled()) {
-				logger.debug("doFilter adding auth to request URI {}",
-						(req instanceof HttpServletRequest) ? ((HttpServletRequest) req).getRequestURL() : req);
-			}
-			EcompRole admin = new EcompRole();
-			admin.setId(1L);
-			admin.setName(DashboardConstants.ROLE_ADMIN);
-			HashSet<EcompRole> roles = new HashSet<>();
-			roles.add(admin);
-			EcompUser user = new EcompUser();
-			user.setLoginId("fakeLoginId");
-			user.setRoles(roles);
-			user.setActive(true);
-			EcompUserDetails userDetails = new EcompUserDetails(user);
-			PreAuthenticatedAuthenticationToken authToken = new PreAuthenticatedAuthenticationToken(userDetails,
-					"fakeCredentials", userDetails.getAuthorities());
-			SecurityContextHolder.getContext().setAuthentication(authToken);
-		} else {
-			logger.debug("doFilter: authorities {}", auth.getAuthorities());
-		}
-		chain.doFilter(req, res);
-	}
+    /*
+     * Populates security context with a mock user in the admin role.
+     *
+     */
+    private void doFilterMockUserAdminRole(ServletRequest req, ServletResponse res, FilterChain chain)
+        throws IOException, ServletException {
+        Authentication auth = SecurityContextHolder.getContext().getAuthentication();
+        if (auth == null || auth.getAuthorities().isEmpty()) {
+            if (logger.isDebugEnabled()) {
+                logger.debug("doFilter adding auth to request URI {}",
+                    (req instanceof HttpServletRequest) ? ((HttpServletRequest) req).getRequestURL() : req);
+            }
+            EcompRole admin = new EcompRole();
+            admin.setId(1L);
+            admin.setName(DashboardConstants.ROLE_ADMIN);
+            HashSet<EcompRole> roles = new HashSet<>();
+            roles.add(admin);
+            EcompUser user = new EcompUser();
+            user.setLoginId("fakeLoginId");
+            user.setRoles(roles);
+            user.setActive(true);
+            EcompUserDetails userDetails = new EcompUserDetails(user);
+            PreAuthenticatedAuthenticationToken authToken =
+                new PreAuthenticatedAuthenticationToken(userDetails, "fakeCredentials", userDetails.getAuthorities());
+            SecurityContextHolder.getContext().setAuthentication(authToken);
+        } else {
+            logger.debug("doFilter: authorities {}", auth.getAuthorities());
+        }
+        chain.doFilter(req, res);
+    }
 
-	/*
-	 * Checks for valid cookies and allows request to be served if found; redirects
-	 * to Portal otherwise.
-	 */
-	private void doFilterEPSDKFW(ServletRequest req, ServletResponse res, FilterChain chain)
-			throws IOException, ServletException {
-		HttpServletRequest request = (HttpServletRequest) req;
-		HttpServletResponse response = (HttpServletResponse) res;
-		if (logger.isTraceEnabled())
-			logger.trace("doFilter: req {}", request.getRequestURI());
-		// Need to authenticate the request
-		final String userId = authManager.validateEcompSso(request);
-		final EcompUser ecompUser = (userId == null ? null : userManager.getUser(userId));
-		if (userId == null || ecompUser == null) {
-			logger.debug("doFilter: unauthorized user requests URI {}, serving login page", request.getRequestURI());
-			StringBuffer sb = request.getRequestURL();
-			sb.append(request.getQueryString() == null ? "" : "?" + request.getQueryString());
-			String body = generateLoginRedirectPage(sb.toString());
-			response.setContentType(MediaType.TEXT_HTML_VALUE);
-			response.getWriter().print(body);
-			response.getWriter().flush();
-		} else {
-			EcompUserDetails userDetails = new EcompUserDetails(ecompUser);
-			// Using portal session as credentials is a hack
-			PreAuthenticatedAuthenticationToken authToken = new PreAuthenticatedAuthenticationToken(userDetails,
-					getPortalSessionId(request), userDetails.getAuthorities());
-			SecurityContextHolder.getContext().setAuthentication(authToken);
-			// Pass request back down the filter chain
-			chain.doFilter(request, response);
-		}
-	}
+    /*
+     * Checks for valid cookies and allows request to be served if found; redirects
+     * to Portal otherwise.
+     */
+    private void doFilterEPSDKFW(ServletRequest req, ServletResponse res, FilterChain chain)
+        throws IOException, ServletException {
+        HttpServletRequest request = (HttpServletRequest) req;
+        HttpServletResponse response = (HttpServletResponse) res;
+        if (logger.isTraceEnabled())
+            logger.trace("doFilter: req {}", request.getRequestURI());
+        // Need to authenticate the request
+        final String userId = authManager.validateEcompSso(request);
+        final EcompUser ecompUser = (userId == null ? null : userManager.getUser(userId));
+        if (userId == null || ecompUser == null) {
+            logger.debug("doFilter: unauthorized user requests URI {}, serving login page", request.getRequestURI());
+            StringBuffer sb = request.getRequestURL();
+            sb.append(request.getQueryString() == null ? "" : "?" + request.getQueryString());
+            String body = generateLoginRedirectPage(sb.toString());
+            response.setContentType(MediaType.TEXT_HTML_VALUE);
+            response.getWriter().print(body);
+            response.getWriter().flush();
+        } else {
+            EcompUserDetails userDetails = new EcompUserDetails(ecompUser);
+            // Using portal session as credentials is a hack
+            PreAuthenticatedAuthenticationToken authToken = new PreAuthenticatedAuthenticationToken(userDetails,
+                getPortalSessionId(request), userDetails.getAuthorities());
+            SecurityContextHolder.getContext().setAuthentication(authToken);
+            // Pass request back down the filter chain
+            chain.doFilter(request, response);
+        }
+    }
 
-	/**
-	 * Generates a page with text only, absolutely no references to any webapp
-	 * resources, so this can be served to an unauthenticated user without
-	 * triggering a new authentication attempt. The page has a link to the Portal
-	 * URL from configuration, with a return URL that is the original request.
-	 * 
-	 * @param appUrl
-	 *                   Original requested URL
-	 * @return HTML
-	 * @throws UnsupportedEncodingException
-	 *                                          On error
-	 */
-	private static String generateLoginRedirectPage(String appUrl) throws UnsupportedEncodingException {
-		String encodedAppUrl = URLEncoder.encode(appUrl, "UTF-8");
-		String portalBaseUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
-		String redirectUrl = portalBaseUrl + "?" + PortalAuthenticationFilter.REDIRECT_URL_KEY + "=" + encodedAppUrl;
-		String aHref = "<a href=\"" + redirectUrl + "\">";
-		// If only Java had "here" documents.
-		String body = String.join(//
-				System.getProperty("line.separator"), //
-				"<html>", //
-				"<head>", //
-				"<title>RIC Dashboard</title>", //
-				"<style>", //
-				"html, body { ", //
-				"  font-family: Helvetica, Arial, sans-serif;", //
-				"}", //
-				"</style>", //
-				"</head>", //
-				"<body>", //
-				"<h2>RIC Dashboard</h2>", //
-				"<h4>Please log in.</h4>", //
-				"<p>", //
-				aHref, "Click here to authenticate at the ONAP Portal</a>", //
-				"</p>", //
-				"</body>", //
-				"</html>");
-		return body;
-	}
+    /**
+     * Generates a page with text only, absolutely no references to any webapp
+     * resources, so this can be served to an unauthenticated user without
+     * triggering a new authentication attempt. The page has a link to the Portal
+     * URL from configuration, with a return URL that is the original request.
+     *
+     * @param appUrl
+     *        Original requested URL
+     * @return HTML
+     * @throws UnsupportedEncodingException
+     *         On error
+     */
+    private static String generateLoginRedirectPage(String appUrl) throws UnsupportedEncodingException {
+        String encodedAppUrl = URLEncoder.encode(appUrl, "UTF-8");
+        String portalBaseUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+        String redirectUrl = portalBaseUrl + "?" + PortalAuthenticationFilter.REDIRECT_URL_KEY + "=" + encodedAppUrl;
+        String aHref = "<a href=\"" + redirectUrl + "\">";
+        // If only Java had "here" documents.
+        String body = String.join(//
+            System.getProperty("line.separator"), //
+            "<html>", //
+            "<head>", //
+            "<title>RIC Dashboard</title>", //
+            "<style>", //
+            "html, body { ", //
+            "  font-family: Helvetica, Arial, sans-serif;", //
+            "}", //
+            "</style>", //
+            "</head>", //
+            "<body>", //
+            "<h2>RIC Dashboard</h2>", //
+            "<h4>Please log in.</h4>", //
+            "<p>", //
+            aHref, "Click here to authenticate at the ONAP Portal</a>", //
+            "</p>", //
+            "</body>", //
+            "</html>");
+        return body;
+    }
 
-	/**
-	 * Searches the request for a cookie with the specified name.
-	 *
-	 * @param request
-	 *                       HttpServletRequest
-	 * @param cookieName
-	 *                       Cookie name
-	 * @return Cookie, or null if not found.
-	 */
-	private Cookie getCookie(HttpServletRequest request, String cookieName) {
-		Cookie[] cookies = request.getCookies();
-		if (cookies != null)
-			for (Cookie cookie : cookies)
-				if (cookie.getName().equals(cookieName))
-					return cookie;
-		return null;
-	}
+    /**
+     * Searches the request for a cookie with the specified name.
+     *
+     * @param request
+     *        HttpServletRequest
+     * @param cookieName
+     *        Cookie name
+     * @return Cookie, or null if not found.
+     */
+    private Cookie getCookie(HttpServletRequest request, String cookieName) {
+        Cookie[] cookies = request.getCookies();
+        if (cookies != null)
+            for (Cookie cookie : cookies)
+                if (cookie.getName().equals(cookieName))
+                    return cookie;
+        return null;
+    }
 
-	/**
-	 * Gets the ECOMP Portal service cookie value.
-	 * 
-	 * @param request
-	 * @return Cookie value, or null if not found.
-	 */
-	private String getPortalSessionId(HttpServletRequest request) {
-		Cookie ep = getCookie(request, PortalApiConstants.EP_SERVICE);
-		if (ep == null)
-			return null;
-		return ep.getValue();
-	}
+    /**
+     * Gets the ECOMP Portal service cookie value.
+     *
+     * @param request
+     * @return Cookie value, or null if not found.
+     */
+    private String getPortalSessionId(HttpServletRequest request) {
+        Cookie ep = getCookie(request, PortalApiConstants.EP_SERVICE);
+        if (ep == null)
+            return null;
+        return ep.getValue();
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java
index 581ca25..a2fae9f 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,52 +38,52 @@
  * Implements the contract used by the Portal to transmit user details to this
  * on-boarded application. The requests are intercepted first by a servlet in
  * the EPSDK-FW library, which proxies the calls to these methods.
- * 
+ *
  * An instance of this class is created upon first request to the API. But this
  * class is found and instantiated via Class.forName(), so cannot use Spring
  * annotations.
  */
 public class PortalRestCentralServiceImpl implements IPortalRestCentralService {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	private final PortalAuthManager authManager;
-	private final DashboardUserManager userManager;
+    private final PortalAuthManager authManager;
+    private final DashboardUserManager userManager;
 
-	public PortalRestCentralServiceImpl() throws IOException, PortalAPIException {
-		final ApplicationContext context = SpringContextCache.getApplicationContext();
-		authManager = (PortalAuthManager) context.getBean(PortalAuthManager.class);
-		userManager = (DashboardUserManager) context.getBean(DashboardUserManager.class);
-	}
+    public PortalRestCentralServiceImpl() throws IOException, PortalAPIException {
+        final ApplicationContext context = SpringContextCache.getApplicationContext();
+        authManager = context.getBean(PortalAuthManager.class);
+        userManager = context.getBean(DashboardUserManager.class);
+    }
 
-	/*
-	 * Answers the Portal API credentials.
-	 */
-	@Override
-	public Map<String, String> getAppCredentials() throws PortalAPIException {
-		logger.debug("getAppCredentials");
-		return authManager.getAppCredentials();
-	}
+    /*
+     * Answers the Portal API credentials.
+     */
+    @Override
+    public Map<String, String> getAppCredentials() throws PortalAPIException {
+        logger.debug("getAppCredentials");
+        return authManager.getAppCredentials();
+    }
 
-	/*
-	 * Extracts the user ID from a cookie in the header
-	 */
-	@Override
-	public String getUserId(HttpServletRequest request) throws PortalAPIException {
-		logger.debug("getuserId");
-		return authManager.validateEcompSso(request);
-	}
+    /*
+     * Extracts the user ID from a cookie in the header
+     */
+    @Override
+    public String getUserId(HttpServletRequest request) throws PortalAPIException {
+        logger.debug("getuserId");
+        return authManager.validateEcompSso(request);
+    }
 
-	@Override
-	public void pushUser(EcompUser user) throws PortalAPIException {
-		logger.debug("pushUser: {}", user);
-		userManager.createUser(user);
-	}
+    @Override
+    public void pushUser(EcompUser user) throws PortalAPIException {
+        logger.debug("pushUser: {}", user);
+        userManager.createUser(user);
+    }
 
-	@Override
-	public void editUser(String loginId, EcompUser user) throws PortalAPIException {
-		logger.debug("editUser: {}", user);
-		userManager.updateUser(loginId, user);
-	}
+    @Override
+    public void editUser(String loginId, EcompUser user) throws PortalAPIException {
+        logger.debug("editUser: {}", user);
+        userManager.updateUser(loginId, user);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorAes.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorAes.java
index 279f1dd..f62ea5f 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorAes.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorAes.java
@@ -24,9 +24,9 @@
 
 public class PortalSdkDecryptorAes implements IPortalSdkDecryptor {
 
-	@SuppressWarnings("deprecation")
-	public String decrypt(String cipherText) throws CipherUtilException {
-		return CipherUtil.decrypt(cipherText);
-	}
+    @SuppressWarnings("deprecation")
+    public String decrypt(String cipherText) throws CipherUtilException {
+        return CipherUtil.decrypt(cipherText);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorPkc.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorPkc.java
index 0127267..1020527 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorPkc.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalSdkDecryptorPkc.java
@@ -24,8 +24,8 @@
 
 public class PortalSdkDecryptorPkc implements IPortalSdkDecryptor {
 
-	public String decrypt(String cipherText) throws CipherUtilException {
-		return CipherUtil.decryptPKC(cipherText);
-	}
+    public String decrypt(String cipherText) throws CipherUtilException {
+        return CipherUtil.decryptPKC(cipherText);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/util/HttpsURLConnectionUtils.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/util/HttpsURLConnectionUtils.java
index a97ed7b..d5f2cbf 100644
--- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/util/HttpsURLConnectionUtils.java
+++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/util/HttpsURLConnectionUtils.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,48 +35,52 @@
  * Disables and enables certificate and host-name checking in
  * HttpsURLConnection, the default JVM implementation of the HTTPS/TLS protocol.
  * Has no effect on implementations such as Apache Http Client, Ok Http.
- * 
+ *
  * https://stackoverflow.com/questions/23504819/how-to-disable-ssl-certificate-checking-with-spring-resttemplate/58291331#58291331
  */
 public final class HttpsURLConnectionUtils {
 
-	private static final HostnameVerifier jvmHostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier();
+    private static final HostnameVerifier jvmHostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier();
 
-	private static final HostnameVerifier trivialHostnameVerifier = new HostnameVerifier() {
-		public boolean verify(String hostname, SSLSession sslSession) {
-			return true;
-		}
-	};
+    private static final HostnameVerifier trivialHostnameVerifier = new HostnameVerifier() {
+        @Override
+        public boolean verify(String hostname, SSLSession sslSession) {
+            return true;
+        }
+    };
 
-	private static final TrustManager[] UNQUESTIONING_TRUST_MANAGER = new TrustManager[] { new X509TrustManager() {
-		public java.security.cert.X509Certificate[] getAcceptedIssuers() {
-			return null;
-		}
+    private static final TrustManager[] UNQUESTIONING_TRUST_MANAGER = new TrustManager[] {new X509TrustManager() {
+        @Override
+        public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+            return null;
+        }
 
-		public void checkClientTrusted(X509Certificate[] certs, String authType) {
-		}
+        @Override
+        public void checkClientTrusted(X509Certificate[] certs, String authType) {
+        }
 
-		public void checkServerTrusted(X509Certificate[] certs, String authType) {
-		}
-	} };
+        @Override
+        public void checkServerTrusted(X509Certificate[] certs, String authType) {
+        }
+    }};
 
-	public static void turnOffSslChecking() throws NoSuchAlgorithmException, KeyManagementException {
-		HttpsURLConnection.setDefaultHostnameVerifier(trivialHostnameVerifier);
-		// Install the all-trusting trust manager
-		SSLContext sc = SSLContext.getInstance("SSL");
-		sc.init(null, UNQUESTIONING_TRUST_MANAGER, null);
-		HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
-	}
+    public static void turnOffSslChecking() throws NoSuchAlgorithmException, KeyManagementException {
+        HttpsURLConnection.setDefaultHostnameVerifier(trivialHostnameVerifier);
+        // Install the all-trusting trust manager
+        SSLContext sc = SSLContext.getInstance("SSL");
+        sc.init(null, UNQUESTIONING_TRUST_MANAGER, null);
+        HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+    }
 
-	public static void turnOnSslChecking() throws KeyManagementException, NoSuchAlgorithmException {
-		HttpsURLConnection.setDefaultHostnameVerifier(jvmHostnameVerifier);
-		// Return it to the initial state (discovered by reflection, now hardcoded)
-		SSLContext sc = SSLContext.getInstance("SSL");
-		sc.init(null, null, null);
-		HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
-	}
+    public static void turnOnSslChecking() throws KeyManagementException, NoSuchAlgorithmException {
+        HttpsURLConnection.setDefaultHostnameVerifier(jvmHostnameVerifier);
+        // Return it to the initial state (discovered by reflection, now hardcoded)
+        SSLContext sc = SSLContext.getInstance("SSL");
+        sc.init(null, null, null);
+        HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+    }
 
-	private HttpsURLConnectionUtils() {
-		throw new UnsupportedOperationException("Do not instantiate libraries.");
-	}
+    private HttpsURLConnectionUtils() {
+        throw new UnsupportedOperationException("Do not instantiate libraries.");
+    }
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java
index a6c0a1e..e19890b 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java
@@ -22,6 +22,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.lang.invoke.MethodHandles;
+
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -29,7 +30,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit.jupiter.SpringExtension;
 
 /**
@@ -49,23 +49,23 @@
 @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
 public class DashboardTestServer {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	/*
-	 * Keeps the test server alive forever. Use a guard so this test is never run by
-	 * Jenkins.
-	 */
-	@EnabledIfSystemProperty(named = "org.oransc.ric.portal.dashboard", matches = "mock")
-	@Test
-	public void keepServerAlive() {
-		logger.warn("Keeping server alive!");
-		try {
-			synchronized (this) {
-				this.wait();
-			}
-		} catch (Exception ex) {
-			logger.warn(ex.toString());
-		}
-		assertEquals(1, 2);
-	}
+    /*
+     * Keeps the test server alive forever. Use a guard so this test is never run by
+     * Jenkins.
+     */
+    @EnabledIfSystemProperty(named = "org.oransc.ric.portal.dashboard", matches = "mock")
+    @Test
+    public void keepServerAlive() {
+        logger.warn("Keeping server alive!");
+        try {
+            synchronized (this) {
+                this.wait();
+            }
+        } catch (Exception ex) {
+            logger.warn(ex.toString());
+        }
+        assertEquals(1, 2);
+    }
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PolicyControllerMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PolicyControllerMockConfiguration.java
index e073ef6..41b9ee0 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PolicyControllerMockConfiguration.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PolicyControllerMockConfiguration.java
@@ -52,143 +52,143 @@
 @TestConfiguration
 public class PolicyControllerMockConfiguration {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	@Bean
-	public PolicyAgentApi policyAgentApi() {
-		MockPolicyAgentApi apiClient = new MockPolicyAgentApi();
-		return apiClient;
-	}
+    @Bean
+    public PolicyAgentApi policyAgentApi() {
+        MockPolicyAgentApi apiClient = new MockPolicyAgentApi();
+        return apiClient;
+    }
 
-	class MockPolicyAgentApi implements PolicyAgentApi {
-		private final Database database = new Database();
+    class MockPolicyAgentApi implements PolicyAgentApi {
+        private final Database database = new Database();
 
-		@Override
-		public ResponseEntity<String> getPolicyInstance(String id) throws RestClientException {
-			return new ResponseEntity<>(database.getInstance(id), HttpStatus.OK);
-		}
+        @Override
+        public ResponseEntity<String> getPolicyInstance(String id) throws RestClientException {
+            return new ResponseEntity<>(database.getInstance(id), HttpStatus.OK);
+        }
 
-		@Override
-		public ResponseEntity<String> putPolicy(String policyTypeIdString, String policyInstanceId, String json,
-				String ric) throws RestClientException {
-			database.putInstance(policyTypeIdString, policyInstanceId, json, ric);
-			return new ResponseEntity<>(HttpStatus.OK);
-		}
+        @Override
+        public ResponseEntity<String> putPolicy(String policyTypeIdString, String policyInstanceId, String json,
+            String ric) throws RestClientException {
+            database.putInstance(policyTypeIdString, policyInstanceId, json, ric);
+            return new ResponseEntity<>(HttpStatus.OK);
+        }
 
-		@Override
-		public void deletePolicy(String policyInstanceId) throws RestClientException {
-			database.deleteInstance(policyInstanceId);
-		}
+        @Override
+        public void deletePolicy(String policyInstanceId) throws RestClientException {
+            database.deleteInstance(policyInstanceId);
+        }
 
-		@Override
-		public ResponseEntity<PolicyTypes> getAllPolicyTypes() throws RestClientException {
-			PolicyTypes result = new PolicyTypes();
-			result.addAll(database.getTypes());
-			return new ResponseEntity<>(result, HttpStatus.OK);
-		}
+        @Override
+        public ResponseEntity<PolicyTypes> getAllPolicyTypes() throws RestClientException {
+            PolicyTypes result = new PolicyTypes();
+            result.addAll(database.getTypes());
+            return new ResponseEntity<>(result, HttpStatus.OK);
+        }
 
-		@Override
-		public ResponseEntity<PolicyInstances> getPolicyInstancesForType(String type) {
-			PolicyInstances result = new PolicyInstances();
-			List<PolicyInfo> inst = database.getInstances(Optional.of(type));
-			result.addAll(inst);
-			return new ResponseEntity<>(result, HttpStatus.OK);
-		}
+        @Override
+        public ResponseEntity<PolicyInstances> getPolicyInstancesForType(String type) {
+            PolicyInstances result = new PolicyInstances();
+            List<PolicyInfo> inst = database.getInstances(Optional.of(type));
+            result.addAll(inst);
+            return new ResponseEntity<>(result, HttpStatus.OK);
+        }
 
-		@Override
-		public ResponseEntity<Collection<String>> getRicsSupportingType(String typeName) {
-			Vector<String> res = new Vector<>();
-			res.add("ric_1");
-			res.add("ric_2");
-			res.add("ric_3");
-			return new ResponseEntity<>(res, HttpStatus.OK);
-		}
-	}
+        @Override
+        public ResponseEntity<Collection<String>> getRicsSupportingType(String typeName) {
+            Vector<String> res = new Vector<>();
+            res.add("ric_1");
+            res.add("ric_2");
+            res.add("ric_3");
+            return new ResponseEntity<>(res, HttpStatus.OK);
+        }
+    }
 
-	class Database {
+    class Database {
 
-		Database() {
-			String schema = getStringFromFile("anr-policy-schema.json");
-			PolicyType policy = new PolicyType("ANR", schema);
-			types.put("ANR", policy);
+        Database() {
+            String schema = getStringFromFile("anr-policy-schema.json");
+            PolicyType policy = new PolicyType("ANR", schema);
+            types.put("ANR", policy);
 
-			schema = getStringFromFile("demo-policy-schema-1.json");
-			policy = new PolicyType("type2", schema);
-			types.put("type2", policy);
+            schema = getStringFromFile("demo-policy-schema-1.json");
+            policy = new PolicyType("type2", schema);
+            types.put("type2", policy);
 
-			schema = getStringFromFile("demo-policy-schema-2.json");
-			policy = new PolicyType("type3", schema);
-			types.put("type3", policy);
+            schema = getStringFromFile("demo-policy-schema-2.json");
+            policy = new PolicyType("type3", schema);
+            types.put("type3", policy);
 
-			schema = getStringFromFile("demo-policy-schema-3.json");
-			policy = new PolicyType("type4", schema);
-			types.put("type4", policy);
-			try {
-				putInstance("ANR", "ANR-1", getStringFromFile("anr-policy-instance.json"), "ric_1");
-			} catch (Exception e) {
-				// Nothing
-			}
-		}
+            schema = getStringFromFile("demo-policy-schema-3.json");
+            policy = new PolicyType("type4", schema);
+            types.put("type4", policy);
+            try {
+                putInstance("ANR", "ANR-1", getStringFromFile("anr-policy-instance.json"), "ric_1");
+            } catch (Exception e) {
+                // Nothing
+            }
+        }
 
-		private String getStringFromFile(String path) {
-			try {
-				InputStream inputStream = MethodHandles.lookup().lookupClass().getClassLoader()
-						.getResourceAsStream(path);
-				return new BufferedReader(new InputStreamReader(inputStream)).lines().collect(Collectors.joining("\n"));
-			} catch (Exception e) {
-				logger.error("Cannot read file :" + path, e);
-				return "";
-			}
-		}
+        private String getStringFromFile(String path) {
+            try {
+                InputStream inputStream =
+                    MethodHandles.lookup().lookupClass().getClassLoader().getResourceAsStream(path);
+                return new BufferedReader(new InputStreamReader(inputStream)).lines().collect(Collectors.joining("\n"));
+            } catch (Exception e) {
+                logger.error("Cannot read file :" + path, e);
+                return "";
+            }
+        }
 
-		String normalize(String str) {
-			return str.replace('\n', ' ');
-		}
+        String normalize(String str) {
+            return str.replace('\n', ' ');
+        }
 
-		private String getTimeStampUTC() {
-			return java.time.Instant.now().toString();
-		}
+        private String getTimeStampUTC() {
+            return java.time.Instant.now().toString();
+        }
 
-		void putInstance(String typeId, String instanceId, String instanceData, String ric) {
-			PolicyInfo i = ImmutablePolicyInfo.builder().json(instanceData).lastModified(getTimeStampUTC())
-					.id(instanceId).ric(ric).service("service").type(typeId).build();
-			instances.put(instanceId, i);
-		}
+        void putInstance(String typeId, String instanceId, String instanceData, String ric) {
+            PolicyInfo i = ImmutablePolicyInfo.builder().json(instanceData).lastModified(getTimeStampUTC())
+                .id(instanceId).ric(ric).service("service").type(typeId).build();
+            instances.put(instanceId, i);
+        }
 
-		public void deleteInstance(String instanceId) {
-			instances.remove(instanceId);
-		}
+        public void deleteInstance(String instanceId) {
+            instances.remove(instanceId);
+        }
 
-		String getInstance(String id) throws RestClientException {
-			PolicyInfo i = instances.get(id);
-			if (i == null) {
-				throw new RestClientException("Type not found: " + id);
-			}
-			return i.json();
-		}
+        String getInstance(String id) throws RestClientException {
+            PolicyInfo i = instances.get(id);
+            if (i == null) {
+                throw new RestClientException("Type not found: " + id);
+            }
+            return i.json();
+        }
 
-		public Collection<PolicyType> getTypes() {
-			return types.values();
-		}
+        public Collection<PolicyType> getTypes() {
+            return types.values();
+        }
 
-		public List<PolicyInfo> getInstances(Optional<String> typeId) {
-			ArrayList<PolicyInfo> result = new ArrayList<>();
-			for (PolicyInfo i : instances.values()) {
-				if (typeId.isPresent()) {
-					if (i.type().equals(typeId.get())) {
-						result.add(i);
-					}
+        public List<PolicyInfo> getInstances(Optional<String> typeId) {
+            ArrayList<PolicyInfo> result = new ArrayList<>();
+            for (PolicyInfo i : instances.values()) {
+                if (typeId.isPresent()) {
+                    if (i.type().equals(typeId.get())) {
+                        result.add(i);
+                    }
 
-				} else {
-					result.add(i);
-				}
-			}
-			return result;
-		}
+                } else {
+                    result.add(i);
+                }
+            }
+            return result;
+        }
 
-		private Map<String, PolicyType> types = new HashMap<>();
-		private Map<String, PolicyInfo> instances = new HashMap<>();
+        private Map<String, PolicyType> types = new HashMap<>();
+        private Map<String, PolicyInfo> instances = new HashMap<>();
 
-	}
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java
index a3d05be..01265d9 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java
@@ -43,41 +43,41 @@
 @Profile("test")
 public class PortalApIMockConfiguration {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// Unfortunately EPSDK-FW does not define these as constants
-	public static final String PORTAL_USERNAME_HEADER_KEY = "username";
-	public static final String PORTAL_PASSWORD_HEADER_KEY = "password";
+    // Unfortunately EPSDK-FW does not define these as constants
+    public static final String PORTAL_USERNAME_HEADER_KEY = "username";
+    public static final String PORTAL_PASSWORD_HEADER_KEY = "password";
 
-	@Bean
-	public ServletRegistrationBean<PortalRestAPIProxy> portalApiProxyServlet() {
-		PortalRestAPIProxy servlet = new PortalRestAPIProxy();
-		final ServletRegistrationBean<PortalRestAPIProxy> servletBean = new ServletRegistrationBean<>(servlet,
-				PortalApiConstants.API_PREFIX + "/*");
-		servletBean.setName("PortalRestApiProxyServlet");
-		return servletBean;
-	}
+    @Bean
+    public ServletRegistrationBean<PortalRestAPIProxy> portalApiProxyServlet() {
+        PortalRestAPIProxy servlet = new PortalRestAPIProxy();
+        final ServletRegistrationBean<PortalRestAPIProxy> servletBean =
+            new ServletRegistrationBean<>(servlet, PortalApiConstants.API_PREFIX + "/*");
+        servletBean.setName("PortalRestApiProxyServlet");
+        return servletBean;
+    }
 
-	@Bean
-	public PortalAuthManager portalAuthManager() throws Exception {
-		PortalAuthManager mockManager = mock(PortalAuthManager.class);
-		final Map<String, String> credentialsMap = new HashMap<>();
-		credentialsMap.put("appName", "appName");
-		credentialsMap.put(PORTAL_USERNAME_HEADER_KEY, PORTAL_USERNAME_HEADER_KEY);
-		credentialsMap.put(PORTAL_PASSWORD_HEADER_KEY, PORTAL_PASSWORD_HEADER_KEY);
-		doAnswer(inv -> {
-			logger.debug("getAppCredentials");
-			return credentialsMap;
-		}).when(mockManager).getAppCredentials();
-		doAnswer(inv -> {
-			logger.debug("getUserId");
-			return "userId";
-		}).when(mockManager).validateEcompSso(any(HttpServletRequest.class));
-		doAnswer(inv -> {
-			logger.debug("getAppCredentials");
-			return credentialsMap;
-		}).when(mockManager).getAppCredentials();
-		return mockManager;
-	}
+    @Bean
+    public PortalAuthManager portalAuthManager() throws Exception {
+        PortalAuthManager mockManager = mock(PortalAuthManager.class);
+        final Map<String, String> credentialsMap = new HashMap<>();
+        credentialsMap.put("appName", "appName");
+        credentialsMap.put(PORTAL_USERNAME_HEADER_KEY, PORTAL_USERNAME_HEADER_KEY);
+        credentialsMap.put(PORTAL_PASSWORD_HEADER_KEY, PORTAL_PASSWORD_HEADER_KEY);
+        doAnswer(inv -> {
+            logger.debug("getAppCredentials");
+            return credentialsMap;
+        }).when(mockManager).getAppCredentials();
+        doAnswer(inv -> {
+            logger.debug("getUserId");
+            return "userId";
+        }).when(mockManager).validateEcompSso(any(HttpServletRequest.class));
+        doAnswer(inv -> {
+            logger.debug("getAppCredentials");
+            return credentialsMap;
+        }).when(mockManager).getAppCredentials();
+        return mockManager;
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java
index 80cde66..3e75606 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java
@@ -42,43 +42,43 @@
 @Profile("test")
 public class WebSecurityMockConfiguration extends WebSecurityConfigurerAdapter {
 
-	public static final String TEST_CRED_ADMIN = "admin";
-	public static final String TEST_CRED_STANDARD = "standard";
+    public static final String TEST_CRED_ADMIN = "admin";
+    public static final String TEST_CRED_STANDARD = "standard";
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	public WebSecurityMockConfiguration(@Value("${userfile}") final String userFilePath) {
-		logger.debug("ctor: user file path {}", userFilePath);
-	}
+    public WebSecurityMockConfiguration(@Value("${userfile}") final String userFilePath) {
+        logger.debug("ctor: user file path {}", userFilePath);
+    }
 
-	@Override
-	protected void configure(AuthenticationManagerBuilder auth) throws Exception {
-		PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
-		auth.inMemoryAuthentication() //
-				.passwordEncoder(encoder) //
-				// The admin user has the admin AND standard roles
-				.withUser(TEST_CRED_ADMIN) //
-				.password(encoder.encode(TEST_CRED_ADMIN))
-				.roles(DashboardConstants.ROLE_NAME_ADMIN, DashboardConstants.ROLE_NAME_STANDARD)//
-				.and()//
-				// The standard user has only the standard role
-				.withUser(TEST_CRED_STANDARD) //
-				.password(encoder.encode(TEST_CRED_STANDARD)) //
-				.roles(DashboardConstants.ROLE_NAME_STANDARD);
-	}
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+        PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
+        auth.inMemoryAuthentication() //
+            .passwordEncoder(encoder) //
+            // The admin user has the admin AND standard roles
+            .withUser(TEST_CRED_ADMIN) //
+            .password(encoder.encode(TEST_CRED_ADMIN))
+            .roles(DashboardConstants.ROLE_NAME_ADMIN, DashboardConstants.ROLE_NAME_STANDARD)//
+            .and()//
+            // The standard user has only the standard role
+            .withUser(TEST_CRED_STANDARD) //
+            .password(encoder.encode(TEST_CRED_STANDARD)) //
+            .roles(DashboardConstants.ROLE_NAME_STANDARD);
+    }
 
-	@Override
-	protected void configure(HttpSecurity http) throws Exception {
-		http.authorizeRequests().anyRequest().authenticated()//
-				.and().httpBasic() //
-				.and().csrf().disable();
-	}
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        http.authorizeRequests().anyRequest().authenticated()//
+            .and().httpBasic() //
+            .and().csrf().disable();
+    }
 
-	@Override
-	public void configure(WebSecurity web) throws Exception {
-		// This disables Spring security, but not the app's filter.
-		web.ignoring().antMatchers(WebSecurityConfiguration.OPEN_PATHS);
-		web.ignoring().antMatchers("/", "/csrf"); // allow swagger-ui to load
-	}
+    @Override
+    public void configure(WebSecurity web) throws Exception {
+        // This disables Spring security, but not the app's filter.
+        web.ignoring().antMatchers(WebSecurityConfiguration.OPEN_PATHS);
+        web.ignoring().antMatchers("/", "/csrf"); // allow swagger-ui to load
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java
index d4163f0..09d3a86 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,69 +44,69 @@
 @ActiveProfiles("test")
 public class AbstractControllerTest {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	// Created by Spring black magic
-	// https://spring.io/guides/gs/testing-web/
-	@LocalServerPort
-	private int localServerPort;
+    // Created by Spring black magic
+    // https://spring.io/guides/gs/testing-web/
+    @LocalServerPort
+    private int localServerPort;
 
-	@Autowired
-	protected TestRestTemplate restTemplate;
+    @Autowired
+    protected TestRestTemplate restTemplate;
 
-	/**
-	 * Flexible URI builder.
-	 * 
-	 * @param queryParams
-	 *                        Map of string-string query parameters
-	 * @param path
-	 *                        Array of path components. If a component has an
-	 *                        embedded slash, the string is split and each
-	 *                        subcomponent is added individually.
-	 * @return URI
-	 */
-	protected URI buildUri(final Map<String, String> queryParams, final String... path) {
-		UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:" + localServerPort + "/");
-		for (int p = 0; p < path.length; ++p) {
-			if (path[p] == null || path[p].isEmpty()) {
-				throw new IllegalArgumentException("Unexpected null or empty at path index " + Integer.toString(p));
-			} else if (path[p].contains("/")) {
-				String[] subpaths = path[p].split("/");
-				for (String s : subpaths)
-					if (!s.isEmpty())
-						builder.pathSegment(s);
-			} else {
-				builder.pathSegment(path[p]);
-			}
-		}
-		if (queryParams != null && queryParams.size() > 0) {
-			for (Map.Entry<String, String> entry : queryParams.entrySet()) {
-				if (entry.getKey() == null || entry.getValue() == null)
-					throw new IllegalArgumentException("Unexpected null key or value");
-				else
-					builder.queryParam(entry.getKey(), entry.getValue());
-			}
-		}
-		return builder.build().encode().toUri();
-	}
+    /**
+     * Flexible URI builder.
+     *
+     * @param queryParams
+     *        Map of string-string query parameters
+     * @param path
+     *        Array of path components. If a component has an
+     *        embedded slash, the string is split and each
+     *        subcomponent is added individually.
+     * @return URI
+     */
+    protected URI buildUri(final Map<String, String> queryParams, final String... path) {
+        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:" + localServerPort + "/");
+        for (int p = 0; p < path.length; ++p) {
+            if (path[p] == null || path[p].isEmpty()) {
+                throw new IllegalArgumentException("Unexpected null or empty at path index " + Integer.toString(p));
+            } else if (path[p].contains("/")) {
+                String[] subpaths = path[p].split("/");
+                for (String s : subpaths)
+                    if (!s.isEmpty())
+                        builder.pathSegment(s);
+            } else {
+                builder.pathSegment(path[p]);
+            }
+        }
+        if (queryParams != null && queryParams.size() > 0) {
+            for (Map.Entry<String, String> entry : queryParams.entrySet()) {
+                if (entry.getKey() == null || entry.getValue() == null)
+                    throw new IllegalArgumentException("Unexpected null key or value");
+                else
+                    builder.queryParam(entry.getKey(), entry.getValue());
+            }
+        }
+        return builder.build().encode().toUri();
+    }
 
-	// Because I put the annotations on this parent class,
-	// must define at least one test here.
-	@Test
-	public void contextLoads() {
-		// Silence Sonar warning about missing assertion.
-		Assertions.assertTrue(logger.isWarnEnabled());
-		logger.info("Context loads on mock profile");
-	}
+    // Because I put the annotations on this parent class,
+    // must define at least one test here.
+    @Test
+    public void contextLoads() {
+        // Silence Sonar warning about missing assertion.
+        Assertions.assertTrue(logger.isWarnEnabled());
+        logger.info("Context loads on mock profile");
+    }
 
-	public TestRestTemplate testRestTemplateAdminRole() {
-		return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_ADMIN,
-				WebSecurityMockConfiguration.TEST_CRED_ADMIN);
-	}
+    public TestRestTemplate testRestTemplateAdminRole() {
+        return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_ADMIN,
+            WebSecurityMockConfiguration.TEST_CRED_ADMIN);
+    }
 
-	public TestRestTemplate testRestTemplateStandardRole() {
-		return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_STANDARD,
-				WebSecurityMockConfiguration.TEST_CRED_STANDARD);
-	}
+    public TestRestTemplate testRestTemplateStandardRole() {
+        return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_STANDARD,
+            WebSecurityMockConfiguration.TEST_CRED_STANDARD);
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java
index 48c5931..643f15e 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java
@@ -36,13 +36,13 @@
 @SpringBootTest
 public class DefaultContextTest {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	@Test
-	public void contextLoads() {
-		// Silence Sonar warning about missing assertion.
-		Assertions.assertTrue(logger.isWarnEnabled());
-		logger.info("Context loads on default profile");
-	}
+    @Test
+    public void contextLoads() {
+        // Silence Sonar warning about missing assertion.
+        Assertions.assertTrue(logger.isWarnEnabled());
+        logger.info("Context loads on default profile");
+    }
 
 }
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java
index dc80968..1e8d3a3 100644
--- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,77 +41,78 @@
 
 public class PortalRestCentralServiceTest extends AbstractControllerTest {
 
-	private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+    private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-	@Test
-	public void getAnalyticsTest() {
-		// paths are hardcoded here exactly like the EPSDK-FW library :(
-		URI uri = buildUri(null, PortalApiConstants.API_PREFIX, "/analytics");
-		logger.info("Invoking {}", uri);
-		ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
-		// No Portal is available so this always fails
-		Assertions.assertTrue(response.getStatusCode().is4xxClientError());
-	}
+    @Test
+    public void getAnalyticsTest() {
+        // paths are hardcoded here exactly like the EPSDK-FW library :(
+        URI uri = buildUri(null, PortalApiConstants.API_PREFIX, "/analytics");
+        logger.info("Invoking {}", uri);
+        ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
+        // No Portal is available so this always fails
+        Assertions.assertTrue(response.getStatusCode().is4xxClientError());
+    }
 
-	@Test
-	public void getErrorPageTest() {
-		// Send unauthorized request
-		URI uri = buildUri(null, "/favicon.ico");
-		logger.info("Invoking {}", uri);
-		ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
-		Assertions.assertTrue(response.getStatusCode().is4xxClientError());
-		Assertions.assertTrue(response.getBody().contains("Static error page"));
-	}
+    @Test
+    public void getErrorPageTest() {
+        // Send unauthorized request
+        URI uri = buildUri(null, "/favicon.ico");
+        logger.info("Invoking {}", uri);
+        ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
+        Assertions.assertTrue(response.getStatusCode().is4xxClientError());
+        Assertions.assertTrue(response.getBody().contains("Static error page"));
+    }
 
-	private HttpEntity<Object> getEntityWithHeaders(Object body) {
-		HttpHeaders headers = new HttpHeaders();
-		headers.set(PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY,
-				PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY);
-		headers.set(PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY,
-				PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY);
-		HttpEntity<Object> entity = new HttpEntity<>(body, headers);
-		return entity;
-	}
+    private HttpEntity<Object> getEntityWithHeaders(Object body) {
+        HttpHeaders headers = new HttpHeaders();
+        headers.set(PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY,
+            PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY);
+        headers.set(PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY,
+            PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY);
+        HttpEntity<Object> entity = new HttpEntity<>(body, headers);
+        return entity;
+    }
 
-	private EcompUser createEcompUser(String loginId) {
-		EcompUser user = new EcompUser();
-		user.setLoginId(loginId);
-		EcompRole role = new EcompRole();
-		role.setRoleFunctions(Collections.EMPTY_SET);
-		role.setId(1L);
-		role.setName(DashboardConstants.ROLE_NAME_ADMIN);
-		Set<EcompRole> roles = new HashSet<>();
-		roles.add(role);
-		user.setRoles(roles);
-		return user;
-	}
+    private EcompUser createEcompUser(String loginId) {
+        EcompUser user = new EcompUser();
+        user.setLoginId(loginId);
+        EcompRole role = new EcompRole();
+        role.setRoleFunctions(Collections.EMPTY_SET);
+        role.setId(1L);
+        role.setName(DashboardConstants.ROLE_NAME_ADMIN);
+        Set<EcompRole> roles = new HashSet<>();
+        roles.add(role);
+        user.setRoles(roles);
+        return user;
+    }
 
-/*	@Test
-	public void createUserTest() {
-		final String loginId = "login1";
-		URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
-		logger.info("Invoking {}", create);
-		HttpEntity<Object> requestEntity = getEntityWithHeaders(createEcompUser(loginId));
-		ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
-		Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-	}
-
-	@Test
-	public void updateUserTest() {
-		final String loginId = "login2";
-		URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
-		EcompUser user = createEcompUser(loginId);
-		logger.info("Invoking {}", create);
-		HttpEntity<Object> requestEntity = getEntityWithHeaders(user);
-		// Create
-		ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
-		Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-		URI update = buildUri(null, PortalApiConstants.API_PREFIX, "user", loginId);
-		user.setEmail("user@company.org");
-		requestEntity = getEntityWithHeaders(user);
-		response = restTemplate.exchange(update, HttpMethod.POST, requestEntity, String.class);
-		Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-	}
-*/
+    /*
+     * @Test
+     * public void createUserTest() {
+     * final String loginId = "login1";
+     * URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
+     * logger.info("Invoking {}", create);
+     * HttpEntity<Object> requestEntity = getEntityWithHeaders(createEcompUser(loginId));
+     * ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
+     * Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+     * }
+     *
+     * @Test
+     * public void updateUserTest() {
+     * final String loginId = "login2";
+     * URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
+     * EcompUser user = createEcompUser(loginId);
+     * logger.info("Invoking {}", create);
+     * HttpEntity<Object> requestEntity = getEntityWithHeaders(user);
+     * // Create
+     * ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
+     * Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+     * URI update = buildUri(null, PortalApiConstants.API_PREFIX, "user", loginId);
+     * user.setEmail("user@company.org");
+     * requestEntity = getEntityWithHeaders(user);
+     * response = restTemplate.exchange(update, HttpMethod.POST, requestEntity, String.class);
+     * Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+     * }
+     */
 
 }
