/** Create correct values. */
 @DataProvider(name = "persistentSearchChangeTypeData")
 public Object[][] createPersistentSearchChangeTypeData() {
   Map<Integer, String> values = new HashMap<>();
   values.put(1, "add");
   values.put(2, "delete");
   values.put(4, "modify");
   values.put(8, "modDN");
   return new Object[][] {{values}};
 }
예제 #2
0
 @Test
 public void main() {
   Map m = new AHTMap();
   m.put(key, oldValue);
   Map.Entry e = (Map.Entry) m.entrySet().iterator().next();
   Object returnVal = e.setValue(newValue);
   assertTrue(returnVal.equals(oldValue));
   assertEquals(m.get(key), newValue);
 }
  @BeforeMethod(groups = {"dev"})
  public static void setup() throws UnknownHostException {
    mongo = new Mongo("localhost", 27017);

    Map<String, String> ctxMap = new HashMap<String, String>();
    ctxMap.put(MongoSink.HOST, "localhost");
    ctxMap.put(MongoSink.PORT, "27017");
    ctxMap.put(MongoSink.DB_NAME, "test_events");
    ctxMap.put(MongoSink.COLLECTION, "test_log");
    ctxMap.put(MongoSink.BATCH_SIZE, "100");

    ctx.putAll(ctxMap);

    Context channelCtx = new Context();
    channelCtx.put("capacity", "1000000");
    channelCtx.put("transactionCapacity", "1000000");
    channel = new MemoryChannel();
    Configurables.configure(channel, channelCtx);
  }