* ============LICENSE_START=======================================================
* so
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.so;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class SoResponseWrapperTest {
SoResponseWrapper identicalResponseWrapper = new SoResponseWrapper(response, requestId);
- assertEquals(responseWrapper, responseWrapper);
+ /*
+ * Disabling sonar because we are purposely checking various branches of the
+ * equals() method.
+ */
+ assertEquals(responseWrapper, responseWrapper); // NOSONAR
assertEquals(responseWrapper, identicalResponseWrapper);
assertNotEquals(null, responseWrapper);
- assertNotEquals("Hello", responseWrapper);
- assertFalse(responseWrapper.equals(null));
- assertFalse(responseWrapper.equals("AString"));
+ assertNotEquals("Hello", responseWrapper); // NOSONAR
+ assertNotEquals(responseWrapper, null);
+ assertNotEquals(responseWrapper, "AString"); // NOSONAR
assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null));
assertNotEquals(new SoResponseWrapper(null, null), identicalResponseWrapper);