Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/121#discussion_r92826386 --- Diff: extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/export/rya/KafkaExportParametersTest.java --- @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rya.indexing.pcj.fluo.app.export.rya; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.junit.Test; + +/** + * Tests the methods of {@link KafkaExportParameters}. + */ +public class KafkaExportParametersTest { + + @Test + public void writeParams() { + final Map<String, String> params = new HashMap<>(); + + // Load some values into the params using the wrapper. + final KafkaExportParameters kafkaParams = new KafkaExportParameters(params); + kafkaParams.setExportToKafka(true); + + // Ensure the params map has the expected values. + final Map<String, String> expectedParams = new HashMap<>(); + expectedParams.put(KafkaExportParameters.CONF_EXPORT_TO_KAFKA, "true"); + assertTrue(kafkaParams.isExportToKafka()); + assertEquals(expectedParams, params); + + // now go the other way. + expectedParams.put(KafkaExportParameters.CONF_EXPORT_TO_KAFKA, "false"); + kafkaParams.setExportToKafka(false); + assertFalse(kafkaParams.isExportToKafka()); + assertEquals(expectedParams, params); + } + @Test + public void writeParamsProps() { + final String KEY1 = "key1"; --- End diff -- All caps is usually reserved for public static final fields of a class.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---