use of org.uberfire.ext.metadata.model.impl.KObjectImpl in project kie-wb-common by kiegroup.
the class FindAllLibraryAssetsQueryTest method cleanupLibraryResults.
@Test
public void cleanupLibraryResults() {
// This is a temporary way to cleanup index results
// for library assets list and count.
// In cluster environment library index each file more than once.
// The index should be revised on next release (7.6).
KObject k1 = new KObjectImpl("", "", "clusterId1", "", "key1", new ArrayList<>(), false);
KObject k2 = new KObjectImpl("", "", "clusterId2", "", "key2", new ArrayList<>(), false);
List<KObject> kObjects = service.distinct(Arrays.asList(k1, k1, k2));
assertEquals(2, kObjects.size());
assertEquals(k1, kObjects.get(0));
assertEquals(k2, kObjects.get(1));
}
Aggregations