/*-
* ============LICENSE_START=======================================================
- * ONAP Policy Model
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * 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.
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.models.tosca;
+package org.onap.policy.models.base;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
-import com.google.gson.annotations.SerializedName;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
+import org.junit.Test;
/**
- * Class to represent the EventFilter in TOSCA definition.
- *
- * @author Chenfei Gao (cgao@research.att.com)
+ * Test the PfUtils class.
*
+ * @author Liam Fallon (liam.fallon@est.tech)
*/
-@ToString
-public class ToscaEventFilter {
-
- @Getter
- @Setter
- @SerializedName("node")
- private String node;
-
- @Getter
- @Setter
- @SerializedName("requirement")
- private String requirement;
+public class PfUtilsTest {
- @Getter
- @Setter
- @SerializedName("capability")
- private String capability;
-}
\ No newline at end of file
+ @Test
+ public void testPfUtils() {
+ assertEquals(0, PfUtils.compareObjects(null, null));
+ assertEquals(-1, PfUtils.compareObjects("hello", null));
+ assertEquals(1, PfUtils.compareObjects(null, "hello"));
+ assertFalse(PfUtils.compareObjects("hello", "goodbye") == 0);
+ assertEquals(0, PfUtils.compareObjects("hello", "hello"));
+ }
+}