Format Java code to ONAP standard
[aai/search-data-service.git] / src / test / java / org / onap / aai / sa / searchdbabstraction / searchapi / SortTest.java
index 62b05c4..832fa98 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.sa.searchdbabstraction.searchapi;
 
+import static org.junit.Assert.assertTrue;
+
 import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.onap.aai.sa.searchdbabstraction.searchapi.Sort;
-
 import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
+import org.junit.Test;
 
 public class SortTest {
 
-  @Test
-  public void sortFieldTest() throws JsonParseException, JsonMappingException, IOException {
+    @Test
+    public void sortFieldTest() throws JsonParseException, JsonMappingException, IOException {
 
-    String field = "fieldname";
-    String order = "ascending";
-    String json = "{\"field\": \"" + field + "\", \"order\": \"" + order + "\"}";
+        String field = "fieldname";
+        String order = "ascending";
+        String json = "{\"field\": \"" + field + "\", \"order\": \"" + order + "\"}";
 
-    ObjectMapper mapper = new ObjectMapper();
-    Sort sort = mapper.readValue(json, Sort.class);
+        ObjectMapper mapper = new ObjectMapper();
+        Sort sort = mapper.readValue(json, Sort.class);
 
-    assertTrue("Unexpected field name in marshalled object.  Expected: " + field + " Actual: " + sort.getField(),
-        field.equals(sort.getField()));
-    assertTrue("Unexpected order field in marshalled object.  Expected: " + order + " Actual: " + sort.getOrder(),
-        order.equals(sort.getOrder().toString()));
+        assertTrue("Unexpected field name in marshalled object.  Expected: " + field + " Actual: " + sort.getField(),
+                field.equals(sort.getField()));
+        assertTrue("Unexpected order field in marshalled object.  Expected: " + order + " Actual: " + sort.getOrder(),
+                order.equals(sort.getOrder().toString()));
 
-  }
+    }
 }