aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java')
-rw-r--r--src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java b/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
index 86057c4..bfac947 100644
--- a/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
+++ b/src/test/java/com/att/nsa/mr/client/impl/MRConsumerImplTest.java
@@ -23,11 +23,13 @@ package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.util.LinkedList;
+import java.util.Properties;
import junit.framework.TestCase;
import org.junit.Test;
+import com.att.nsa.mr.client.MRClientFactory;
import com.att.nsa.mr.client.impl.MRConstants;
import com.att.nsa.mr.client.impl.MRConsumerImpl;
@@ -92,4 +94,19 @@ public class MRConsumerImplTest extends TestCase
final String url = c.createUrlPath (MRConstants.makeConsumerUrl ( "localhost:8080", "topic", "cg", "cid","http" ), -1, -1 );
assertEquals ( "http://localhost:8080/events/" + "topic/cg/cid?filter=%7B+%22foo%22%3D%22bar%22bar%22+%7D", url );
}
+
+ @Test
+ public void testFetchWithReturnConsumerResponse () throws IOException
+ {
+ final LinkedList<String> hosts = new LinkedList<String> ();
+ hosts.add ( "localhost:8080" );
+ Properties properties = new Properties();
+ properties.load(MRSimplerBatchConsumerTest.class.getClassLoader().getResourceAsStream("dme2/consumer.properties"));
+
+ final MRConsumerImpl c = new MRConsumerImpl ( hosts, "topic", "cg", "cid", -1, -1, "{ \"foo\"=\"bar\"bar\" }", null, null );
+ c.fetchWithReturnConsumerResponse();
+ c.setProtocolFlag("HTTPAAF");
+ c.fetchWithReturnConsumerResponse();
+ assertTrue(true);
+ }
}