/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.models.sim.dmaap.rest;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
+import jakarta.ws.rs.core.Response;
import java.io.File;
import java.util.Arrays;
import java.util.Map;
-import javax.ws.rs.core.Response;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.utils.coder.Coder;
private static final String CONSUMER = "my-consumer";
private static final String CONSUMER_ID = "my-id";
- private static Coder coder = new StandardCoder();
+ private static final Coder coder = new StandardCoder();
private DmaapSimRestControllerV1 rest;
resp = rest.getDmaapMessage(TOPIC, CONSUMER, CONSUMER_ID, LIMIT, 0);
assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
assertEquals("[my-message, my-message-B]", resp.getEntity().toString());
+
+ // verify getDmaapTopics
+ resp = rest.getDmaapTopics();
+ assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
+ assertThat(resp.getEntity().toString()).contains("POLICY-PDP-PAP");
}
private int getCount(Response resp) {