// Path: src/test/java/storm/benchmark/util/MockTupleHelpers.java
// public final class MockTupleHelpers {
//   public static final String ANY_COMPONENT_ID = "any_component_id";
//   public static final String ANY_STREAM_ID = "any_stream_id";
// 
//   private MockTupleHelpers() {
//   }
// 
//   public static Tuple mockTickTuple() {
//     return mockTuple(Constants.SYSTEM_COMPONENT_ID, Constants.SYSTEM_TICK_STREAM_ID);
//   }
// 
//   public static Tuple mockAnyTuple() {
//     return mockTuple(ANY_COMPONENT_ID, ANY_STREAM_ID);
//   }
// 
//   public static Tuple mockTuple(String componentId, String streamId) {
//     Tuple tuple = mock(Tuple.class);
//     when(tuple.getSourceComponent()).thenReturn(componentId);
//     when(tuple.getSourceStreamId()).thenReturn(streamId);
//     return tuple;
//   }
// }


import backtype.storm.topology.BasicOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import storm.benchmark.util.MockTupleHelpers;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
/*
 * 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 storm.benchmark.lib.bolt;



public class FilterBoltTest {
  private static final String TO_FILTER = "to_filter";
  private static final String NON_FILTER = "non_filter";
  private FilterBolt bolt;
  private Tuple tuple;
  private BasicOutputCollector collector;
  private OutputFieldsDeclarer declarer;

  @BeforeMethod
  public void setUp() {
    bolt = new FilterBolt(TO_FILTER);
// Path: src/test/java/storm/benchmark/util/MockTupleHelpers.java
// public final class MockTupleHelpers {
//   public static final String ANY_COMPONENT_ID = "any_component_id";
//   public static final String ANY_STREAM_ID = "any_stream_id";
// 
//   private MockTupleHelpers() {
//   }
// 
//   public static Tuple mockTickTuple() {
//     return mockTuple(Constants.SYSTEM_COMPONENT_ID, Constants.SYSTEM_TICK_STREAM_ID);
//   }
// 
//   public static Tuple mockAnyTuple() {
//     return mockTuple(ANY_COMPONENT_ID, ANY_STREAM_ID);
//   }
// 
//   public static Tuple mockTuple(String componentId, String streamId) {
//     Tuple tuple = mock(Tuple.class);
//     when(tuple.getSourceComponent()).thenReturn(componentId);
//     when(tuple.getSourceStreamId()).thenReturn(streamId);
//     return tuple;
//   }
// }


// Path: src/test/java/storm/benchmark/lib/bolt/FilterBoltTest.java
import backtype.storm.topology.BasicOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import storm.benchmark.util.MockTupleHelpers;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;

/*
 * 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 storm.benchmark.lib.bolt;



public class FilterBoltTest {
  private static final String TO_FILTER = "to_filter";
  private static final String NON_FILTER = "non_filter";
  private FilterBolt bolt;
  private Tuple tuple;
  private BasicOutputCollector collector;
  private OutputFieldsDeclarer declarer;

  @BeforeMethod
  public void setUp() {
    bolt = new FilterBolt(TO_FILTER);
    tuple = MockTupleHelpers.mockAnyTuple();