public List<ITestNGMethod> getMethodsThatBelongTo(String group, ITestNGMethod fromMethod) { Set<String> uniqueKeys = m_groups.keySet(); List<ITestNGMethod> result = Lists.newArrayList(); for (String k : uniqueKeys) { if (Pattern.matches(group, k)) { result.addAll(m_groups.get(k)); } } if (result.isEmpty() && !fromMethod.ignoreMissingDependencies()) { throw new TestNGException("DependencyMap::Method \"" + fromMethod + "\" depends on nonexistent group \"" + group + "\""); } else { return result; } }
/** * Create the test methods that belong to this class (rejects * all those that belong to a different class). */ private ITestNGMethod[] createTestMethods(ITestNGMethod[] methods) { List<ITestNGMethod> vResult = Lists.newArrayList(); for (ITestNGMethod tm : methods) { ConstructorOrMethod m = tm.getConstructorOrMethod(); if (m.getDeclaringClass().isAssignableFrom(m_testClass)) { for (Object o : m_iClass.getInstances(false)) { log(4, "Adding method " + tm + " on TestClass " + m_testClass); vResult.add(new TestNGScenario(/* tm.getRealClass(), */ m.getMethod(), m_annotationFinder, m_xmlTest, o)); } } else { log(4, "Rejecting method " + tm + " for TestClass " + m_testClass); } } ITestNGMethod[] result = vResult.toArray(new ITestNGMethod[vResult.size()]); return result; }
/** * Apply the method interceptor (if applicable) to the list of methods. */ private ITestNGMethod[] intercept(ITestNGMethod[] methods) { List<IMethodInstance> methodInstances = methodsToMethodInstances(Arrays.asList(methods)); // add built-in interceptor (PreserveOrderMethodInterceptor or InstanceOrderingMethodInterceptor at the end of the list m_methodInterceptors.add(builtinInterceptor); for (IMethodInterceptor m_methodInterceptor : m_methodInterceptors) { methodInstances = m_methodInterceptor.intercept(methodInstances, this); } List<ITestNGMethod> result = Lists.newArrayList(); for (IMethodInstance imi : methodInstances) { result.add(imi.getMethod()); } //Since an interceptor is involved, we would need to ensure that the ClassMethodMap object is in sync with the //output of the interceptor, else @AfterClass doesn't get executed at all when interceptors are involved. //so let's update the current classMethodMap object with the list of methods obtained from the interceptor. this.m_classMethodMap = new ClassMethodMap(result, null); return result.toArray(new ITestNGMethod[result.size()]); }
private List<List<IMethodInstance>> createInstances(List<IMethodInstance> methodInstances) { Map<Object, List<IMethodInstance>> map = Maps.newHashMap(); // MapList<IMethodInstance[], Object> map = new MapList<IMethodInstance[], Object>(); for (IMethodInstance imi : methodInstances) { for (Object o : imi.getInstances()) { System.out.println(o); List<IMethodInstance> l = map.get(o); if (l == null) { l = Lists.newArrayList(); map.put(o, l); } l.add(imi); } // for (Object instance : imi.getInstances()) { // map.put(imi, instance); // } } // return map.getKeys(); // System.out.println(map); return new ArrayList<List<IMethodInstance>>(map.values()); }
@Override public Injector getInjector(IClass iClass) { Annotation annotation = AnnotationHelper.findAnnotationSuperClasses(Guice.class, iClass.getRealClass()); if (annotation == null) return null; if (iClass instanceof TestClass) { iClass = ((TestClass)iClass).getIClass(); } if (!(iClass instanceof ClassImpl)) return null; Injector parentInjector = ((ClassImpl)iClass).getParentInjector(); Guice guice = (Guice) annotation; List<Module> moduleInstances = Lists.newArrayList(getModules(guice, parentInjector, iClass.getRealClass())); // Reuse the previous injector, if any Injector injector = getInjector(moduleInstances); if (injector == null) { injector = parentInjector.createChildInjector(moduleInstances); addInjector(moduleInstances, injector); } return injector; }
/** * Collects and orders test or configuration methods * @param methods methods to be worked on * @param forTests true for test methods, false for configuration methods * @param runInfo * @param finder annotation finder * @param unique true for unique methods, false otherwise * @param outExcludedMethods * @return list of ordered methods */ public static ITestNGMethod[] collectAndOrderMethods(List<ITestNGMethod> methods, boolean forTests, RunInfo runInfo, IAnnotationFinder finder, boolean unique, List<ITestNGMethod> outExcludedMethods) { List<ITestNGMethod> includedMethods = Lists.newArrayList(); MethodGroupsHelper.collectMethodsByGroup(methods.toArray(new ITestNGMethod[methods.size()]), forTests, includedMethods, outExcludedMethods, runInfo, finder, unique); return sortMethods(forTests, includedMethods, finder).toArray(new ITestNGMethod[]{}); }
private static List<ITestNGMethod> sortMethods(boolean forTests, List<ITestNGMethod> allMethods, IAnnotationFinder finder) { List<ITestNGMethod> sl = Lists.newArrayList(); List<ITestNGMethod> pl = Lists.newArrayList(); ITestNGMethod[] allMethodsArray = allMethods.toArray(new ITestNGMethod[allMethods.size()]); // Fix the method inheritance if these are @Configuration methods to make // sure base classes are invoked before child classes if 'before' and the // other way around if they are 'after' if (!forTests && allMethodsArray.length > 0) { ITestNGMethod m = allMethodsArray[0]; boolean before = m.isBeforeClassConfiguration() || m.isBeforeMethodConfiguration() || m.isBeforeSuiteConfiguration() || m.isBeforeTestConfiguration(); MethodInheritance.fixMethodInheritance(allMethodsArray, before); } topologicalSort(allMethodsArray, sl, pl); List<ITestNGMethod> result = Lists.newArrayList(); result.addAll(sl); result.addAll(pl); return result; }
/** * Process testResult to create parameters provided via {@link Parameters} * * @param testResult TestNG's testResult context * @param parametersAnnotation Annotation with parameters * @return Step Parameters being sent to Report Portal */ private List<ParameterResource> createAnnotationParameters(ITestResult testResult, Parameters parametersAnnotation) { List<ParameterResource> params = Lists.newArrayList(); String[] keys = parametersAnnotation.value(); Object[] parameters = testResult.getParameters(); if (parameters.length != keys.length) { return params; } for (int i = 0; i < keys.length; i++) { ParameterResource parameter = new ParameterResource(); parameter.setKey(keys[i]); parameter.setValue(parameters[i] != null ? parameters[i].toString() : null); params.add(parameter); } return params; }
public static SuiteMessage createSuiteMessage(final String message) { int type = getMessageType(message); String[] messageParts = parseMessage(message); SuiteMessage result = new SuiteMessage(messageParts[1], MessageHelper.SUITE_START == type, Integer.parseInt(messageParts[2])); // Any excluded methods? if (messageParts.length > 3) { int count = Integer.parseInt(messageParts[3]); if (count > 0) { List<String> methods = Lists.newArrayList(); int i = 4; while (count-- > 0) { methods.add(messageParts[i++]); } result.setExcludedMethods(methods); } } return result; }
private static String[] tokenize(final String message, final char separator) { if(null == message) { return new String[0]; } List<String> tokens = Lists.newArrayList(); int start = 0; for(int i = 0; i < message.length(); i++) { if(separator == message.charAt(i)) { tokens.add(message.substring(start, i)); start = i + 1; } } if(start < message.length()) { tokens.add(message.substring(start, message.length())); } return tokens.toArray(new String[tokens.size()]); }
private void runTest(String arg, int portValue, IMessageSender sms) { p("Launching RemoteTestNG on port " + portValue); String protocol = null; if (sms instanceof JsonMessageSender) { protocol = "json"; } launchRemoteTestNG(arg, portValue, protocol); MessageHub mh = new MessageHub(sms); List<String> received = Lists.newArrayList(); try { mh.initReceiver(); IMessage message = mh.receiveMessage(); while (message != null) { received.add(message.getClass().getSimpleName()); message = mh.receiveMessage(); } Assert.assertEquals(received, EXPECTED_MESSAGES); } catch(SocketTimeoutException ex) { Assert.fail("Time out"); } }
@Test public void testParseLogFiles() throws Exception { // setup initial state File baseFolder = createBaseFolder(); File folder = new File(baseFolder, "folder"); Files.createDirectory(folder.toPath()); File log1 = LogFileHelper.getValidRLLogFile("ranked.log"); File log2 = LogFileHelper.getValidRLLogFile("mixed.log"); Path path1 = Files.copy(log1.toPath(), new File(baseFolder, log1.getName()).toPath()); Path path2 = Files.copy(log2.toPath(), new File(baseFolder, log2.getName()).toPath()); List<File> files = Lists.newArrayList(baseFolder.listFiles()); SortedSet<MatchResult> results = new TreeSet<>(); ScanTask.parseLogFiles(files, results); assertEquals(results.size(), 15); Files.delete(path1); Files.delete(path2); Files.delete(folder.toPath()); Files.delete(baseFolder.toPath()); }
@Test(groups = "efficiency") @Parameters({"capacity", "passes", "generatorMultipler", "workingSetMultiplier"}) public void benchmark(int capacity, int passes, int generatorMultipler, int workingSetMultiplier) { Generator generator = new ScrambledZipfianGenerator(generatorMultipler * capacity); List<List<String>> workingSets = Lists.newArrayList(); for (int i = 1; i <= passes; i++) { int size = i * workingSetMultiplier * capacity; workingSets.add(createWorkingSet(generator, size)); } Set<Policy> seen = EnumSet.noneOf(Policy.class); for (CacheType cache : CacheType.values()) { if (!seen.add(cache.policy())) { continue; } Map<String, String> map = new CacheFactory() .maximumCapacity(capacity) .makeCache(cache); System.out.println(cache.policy().toString() + ":"); for (List<String> workingSet : workingSets) { System.out.println(determineEfficiency(map, workingSet)); } } }
@Test public void testListCopyableVersions() { Properties props = new Properties(); Path dummyPath = new Path("dummy"); DateTime dt1 = new DateTime().minusDays(8); DateTime dt2 = new DateTime().minusDays(6); props.put(SelectAfterTimeBasedPolicy.TIME_BASED_SELECTION_LOOK_BACK_TIME_KEY, "7d"); SelectAfterTimeBasedPolicy policyLookback7Days = new SelectAfterTimeBasedPolicy(props); TimestampedDatasetVersion version1 = new TimestampedDatasetVersion(dt1, dummyPath); TimestampedDatasetVersion version2 = new TimestampedDatasetVersion(dt2, dummyPath); Assert.assertEquals(policyLookback7Days.listSelectedVersions(Lists.newArrayList(version1, version2)).size(), 1); props.put(SelectAfterTimeBasedPolicy.TIME_BASED_SELECTION_LOOK_BACK_TIME_KEY, "1h"); SelectAfterTimeBasedPolicy policyLookback1Hour = new SelectAfterTimeBasedPolicy(props); Assert.assertEquals(policyLookback1Hour.listSelectedVersions(Lists.newArrayList(version1, version2)).size(), 0); props.put(SelectAfterTimeBasedPolicy.TIME_BASED_SELECTION_LOOK_BACK_TIME_KEY, "9d"); SelectAfterTimeBasedPolicy policyLookback8Days = new SelectAfterTimeBasedPolicy(props); Assert.assertEquals(policyLookback8Days.listSelectedVersions(Lists.newArrayList(version1, version2)).size(), 2); }
@Test public void testFailJobWhenPreviousStateExistsButDoesNotHaveSnapshot() { try { DummyFileBasedSource source = new DummyFileBasedSource(); WorkUnitState workUnitState = new WorkUnitState(); workUnitState.setId("priorState"); List<WorkUnitState> workUnitStates = Lists.newArrayList(workUnitState); State state = new State(); state.setProp(ConfigurationKeys.EXTRACT_TABLE_TYPE_KEY, Extract.TableType.SNAPSHOT_ONLY.toString()); state.setProp(ConfigurationKeys.SOURCE_FILEBASED_FS_PRIOR_SNAPSHOT_REQUIRED, true); SourceState sourceState = new SourceState(state, workUnitStates); source.getWorkunits(sourceState); Assert.fail("Expected RuntimeException, but no exceptions were thrown."); } catch (RuntimeException e) { Assert.assertEquals("No 'source.filebased.fs.snapshot' found on state of prior job", e.getMessage()); } }
@Test public void listFilesAttachedToContainerShouldConvertNullsToEmptyResult() throws ServerError { metadataPrxMock.returns(null).loadSpecifiedAnnotationsLinkedTo( FileAnnotation.class.getName(), null, null, ContainerType.project.getModelClass().getName(), Lists.newArrayList(1L), null); Map<Long, Collection<FileAnnotationData>> result = annotationService.listFilesAttachedToContainer( ContainerType.project.getModelClass(), 1L); assertNotNull(result, "Non-null results expected"); assertTrue(result.isEmpty(), "Empty results expected"); sessionMock.assertInvoked().getMetadataService(); metadataPrxMock.assertInvoked().loadSpecifiedAnnotationsLinkedTo( FileAnnotation.class.getName(), null, null, ContainerType.project.getModelClass().getName(), Lists.newArrayList(1L), null); }
@Test public void listTagsLinkedToDatasetsShouldConvertNullsToEmptyResult() throws ServerError { metadataPrxMock.returns(null).loadSpecifiedAnnotationsLinkedTo( TagAnnotation.class.getName(), null, null, Dataset.class.getName(), Lists.newArrayList(1L), BlitzUtil.byExperimenter(1L)); Map<Long, Collection<TagAnnotationData>> result = annotationService.listTagsLinkedToContainers(1L, Lists.newArrayList(1L), Dataset.class); assertNotNull(result, "Non-null results expected"); assertTrue(result.isEmpty(), "Empty results expected"); sessionMock.assertInvoked().getMetadataService(); metadataPrxMock.assertInvoked().loadSpecifiedAnnotationsLinkedTo( TagAnnotation.class.getName(), null, null, Dataset.class.getName(), Lists.newArrayList(1L), BlitzUtil.byExperimenter(1L)); }
@Test public void getLinesShouldTrimValues() { String fixture = " some.container.name , some.annotation.value , , \n , , , "; CsvAnnotationsReader reader = new CsvAnnotationsReader(CommonsCsvStringReader.defaultReader(fixture)); Collection<CsvAnnotationLine> result = reader.getLines(); assertNotNull(result,"Non null lines expected"); assertEquals(result.size(), 1, "Wrong lines count"); CsvAnnotationLine line = Iterables.getOnlyElement(result); assertEquals(line.getNumber(), Long.valueOf(1), "Wrong line number"); assertEquals(line.getSize(), 2, "Wrong line count"); assertEquals(line.getAnnotationsSize(), 1, "Wrong annotations count"); assertEquals(line.getAnnotatedName(), "some.container.name", "Wrong target name"); assertReflectionEquals("Wrong annotation name", Lists.newArrayList("some.annotation.value"), line.getAnnotationsValues(), LENIENT_ORDER); }
private List<Long> getFunctionIds(String datasets, String functionIds) { List<Long> functionIdsList = new ArrayList<>(); if (StringUtils.isNotBlank(functionIds)) { String[] tokens = functionIds.split(","); for (String token : tokens) { functionIdsList.add(Long.valueOf(token)); } } else if (StringUtils.isNotBlank(datasets)) { List<String> datasetsList = Lists.newArrayList(datasets.split(",")); for (String dataset : datasetsList) { List<AnomalyFunctionDTO> anomalyFunctions = anomalyFunctionDAO.findAllByCollection(dataset); for (AnomalyFunctionDTO anomalyFunction : anomalyFunctions) { functionIdsList.add(anomalyFunction.getId()); } } } return functionIdsList; }
@BeforeSuite public void setupProxy(ITestContext testContext) { testContext.getSuite().setAttribute("cleanups", Lists.newArrayList()); String proxyHost = testConfig.getProperty("proxy.host"); String proxyPortString = testConfig.getProperty("proxy.port"); if( proxyPortString != null ) { System.setProperty("http.proxyHost", proxyHost); System.setProperty("http.proxyPort", proxyPortString); } }
private static Object[][] combine(final Object[][]... testData) { List<Object[]> result = Lists.newArrayList(); for (Object[][] t : testData) { result.addAll(Arrays.asList(t)); } return result.toArray(new Object[result.size()][]); }
@DataProvider static Object[][] testCasesAll() { List<Object[]> result = Lists.newArrayList(); result.addAll(Arrays.asList(testClasses())); result.addAll(Arrays.asList(testInterfaces())); return result.toArray(new Object[result.size()][]); }
@Test public void testInsertMany() throws Exception { List<Map<String, Object>> dataList = Lists.newArrayList(); for (int i =0; i< 10; i++){ Map<String, Object> map = Maps.newHashMap(); map.put("number", i); dataList.add(map); } dataAccess.insertMany("testNumber", dataList); }
@Test public void testReplicationClient() throws Exception { log.info("--- Starting ReplicatorTlsTest::testReplicationClient ---"); for (BrokerService ns : Lists.newArrayList(ns1, ns2, ns3)) { ns.getReplicationClients().forEach((cluster, client) -> { assertTrue(((PulsarClientImpl) client).getConfiguration().isUseTls()); assertEquals(((PulsarClientImpl) client).getConfiguration().getTlsTrustCertsFilePath(), TLS_SERVER_CERT_FILE_PATH); }); } }
@Test(enabled = false) public void testConfigChangeNegativeCases() throws Exception { log.info("--- Starting ReplicatorTest::testConfigChangeNegativeCases ---"); // Negative test cases for global namespace config change. Verify that the namespace config change can not be // updated when the namespace is being unloaded. // Set up field access to internal namespace state in NamespaceService Field ownershipCacheField = NamespaceService.class.getDeclaredField("ownershipCache"); ownershipCacheField.setAccessible(true); OwnershipCache ownerCache = (OwnershipCache) ownershipCacheField.get(pulsar1.getNamespaceService()); Assert.assertNotNull(pulsar1, "pulsar1 is null"); Assert.assertNotNull(pulsar1.getNamespaceService(), "pulsar1.getNamespaceService() is null"); NamespaceBundle globalNsBundle = pulsar1.getNamespaceService().getNamespaceBundleFactory() .getFullBundle(NamespaceName.get("pulsar/global/ns")); ownerCache.tryAcquiringOwnership(globalNsBundle); Assert.assertNotNull(ownerCache.getOwnedBundle(globalNsBundle), "pulsar1.getNamespaceService().getOwnedServiceUnit(NamespaceName.get(\"pulsar/global/ns\")) is null"); Field stateField = OwnedBundle.class.getDeclaredField("isActive"); stateField.setAccessible(true); // set the namespace to be disabled ownerCache.disableOwnership(globalNsBundle); // Make sure the namespace config update failed try { admin1.namespaces().setNamespaceReplicationClusters("pulsar/global/ns", Lists.newArrayList("r1")); fail("Should have raised exception"); } catch (PreconditionFailedException pfe) { // OK } // restore the namespace state ownerCache.removeOwnership(globalNsBundle).get(); ownerCache.tryAcquiringOwnership(globalNsBundle); }
@Test(dependsOnMethods = "canListImages") public void canFindImageById() throws IOException { try (CloudApiConnectionContext context = cloudApi.createConnectionContext()) { final List<Image> images = Lists.newArrayList(imagesApi.list(context)); assertFalse(images.isEmpty(), "There must be at least a single image"); Collections.shuffle(images); final UUID imageId = images.iterator().next().getId(); final Image pkg = imagesApi.findById(imageId); assertNotNull(pkg, "There must be a image returned"); assertEquals(pkg.getId(), imageId, "Image ids must match"); } }
@Test(dependsOnMethods = "canListPackages") public void canFindPackageById() throws IOException { try (CloudApiConnectionContext context = cloudApi.createConnectionContext()) { final List<Package> packages = Lists.newArrayList(packagesApi.list(context)); assertFalse(packages.isEmpty(), "There must be at least a single package"); Collections.shuffle(packages); final UUID packageId = packages.iterator().next().getId(); final Package pkg = packagesApi.findById(packageId); assertNotNull(pkg, "There must be a package returned"); assertEquals(pkg.getId(), packageId, "Package ids must match"); } }
/** * @return all the @Listeners annotations found in the current class and its * superclasses. */ private ListenerHolder findAllListeners(Class<?> cls) { ListenerHolder result = new ListenerHolder(); result.listenerClasses = Lists.newArrayList(); do { IListenersAnnotation l = m_annotationFinder.findAnnotation(cls, IListenersAnnotation.class); if (l != null) { Class<? extends ITestNGListener>[] classes = l.getValue(); for (Class<? extends ITestNGListener> c : classes) { result.listenerClasses.add(c); if (ITestNGListenerFactory.class.isAssignableFrom(c)) { if (result.listenerFactoryClass == null) { result.listenerFactoryClass = (Class<? extends ITestNGListenerFactory>) c; } else { throw new TestNGException("Found more than one class implementing" + "ITestNGListenerFactory:" + c + " and " + result.listenerFactoryClass); } } } } cls = cls.getSuperclass(); } while (cls != Object.class); return result; }
private Map<String, String> createGroups(String[] groups) { Map<String, String> result = Maps.newHashMap(); // Groups that were passed on the command line for (String group : groups) { result.put(group, group); } // See if we have any MetaGroups and // expand them if they match one of the groups // we have just been passed List<String> unfinishedGroups = Lists.newArrayList(); if (m_metaGroups.size() > 0) { collectGroups(groups, unfinishedGroups, result); // Do we need to loop over unfinished groups? while (unfinishedGroups.size() > 0) { String[] uGroups = unfinishedGroups.toArray(new String[unfinishedGroups.size()]); unfinishedGroups = Lists.newArrayList(); collectGroups(uGroups, unfinishedGroups, result); } } // Utils.dumpMap(result); return result; }
private IMethodInstance[] findClasses(List<IMethodInstance> methodInstances, Class<?> c) { List<IMethodInstance> result = Lists.newArrayList(); for (IMethodInstance mi : methodInstances) { if (mi.getMethod().getTestClass().getRealClass() == c) { result.add(mi); } } return result.toArray(new IMethodInstance[result.size()]); }
/** * @@@ remove this */ private List<MethodInstance> methodsToMultipleMethodInstances(ITestNGMethod... sl) { List<MethodInstance> vResult = Lists.newArrayList(); for (ITestNGMethod m : sl) { vResult.add(new MethodInstance(m)); } return vResult; }
public List<ITestNGMethod> getInvokedMethods() { List<ITestNGMethod> result= Lists.newArrayList(); synchronized(m_invokedMethods) { for (IInvokedMethod im : m_invokedMethods) { ITestNGMethod tm= im.getTestMethod(); tm.setDate(im.getDate()); result.add(tm); } } return result; }
/** * Extracts the unique list of <code>ITestNGMethod</code>s. */ public static List<ITestNGMethod> uniqueMethodList(Collection<List<ITestNGMethod>> methods) { Set<ITestNGMethod> resultSet = Sets.newHashSet(); for (List<ITestNGMethod> l : methods) { resultSet.addAll(l); } return Lists.newArrayList(resultSet); }
/** * @return A sorted array containing all the methods 'method' depends on */ public static List<ITestNGMethod> getMethodsDependedUpon(ITestNGMethod method, ITestNGMethod[] methods) { Graph<ITestNGMethod> g = GRAPH_CACHE.get(methods); if (g == null) { List<ITestNGMethod> parallelList = Lists.newArrayList(); List<ITestNGMethod> sequentialList = Lists.newArrayList(); g = topologicalSort(methods, sequentialList, parallelList); GRAPH_CACHE.put(methods, g); } List<ITestNGMethod> result = g.findPredecessors(method); return result; }
@Query public Iterable<Sample> getSampleIds(long start, long end, boolean increment) { List<Sample> samples = Lists.newArrayList(); if (increment) { samples.add(new Sample(start + 1, end + 1)); } else { samples.add(new Sample(start, end)); } return samples; }
@Test public void testUpdatesAndDatabusEvents() { resetValues(); UUID changeId1 = TimeUUIDs.newUUID(); SystemClock.tick(); UUID changeId2 = TimeUUIDs.newUUID(); _dataStore.update("test:table", "rowkey", changeId1, Deltas.mapBuilder() .update("test", Deltas.literal("testValue")) .build(), new AuditBuilder().setComment("Update").build()); // Verify that databus would receive the correct UpdateIntentEvent UpdateIntentEvent expectedUpdateIntentEvent = new UpdateIntentEvent(_dataStore, Lists.newArrayList( new UpdateRef("test:table", "rowkey", changeId1, ImmutableSet.<String>of()))); assertEquals(_updateIntentEvent.getUpdateRefs(), expectedUpdateIntentEvent.getUpdateRefs(), "Expected events not generated on databus"); // Try updating the event but suppress databus events resetValues(); _dataStore.updateAll(Lists.newArrayList(new Update("test:table", "rowkey", changeId2, Deltas.mapBuilder() .update("test", Deltas.literal("testValue")) .build(), new AuditBuilder().setComment("Update").build())), ImmutableSet.of("ignore")); // Verify that the ignorable flag is set expectedUpdateIntentEvent = new UpdateIntentEvent(_dataStore, Lists.newArrayList(new UpdateRef("test:table", "rowkey", changeId2, ImmutableSet.of("ignore")))); assertEquals(_updateIntentEvent.getUpdateRefs(), expectedUpdateIntentEvent.getUpdateRefs(), "Expected events not generated on databus"); }