public <T extends Conflict> MergeTestQuery hasConflict(Class<T> clazz, int i) { conflicts = manager.getConflicts(); assertEquals("Number of conflicts", i, conflicts.size()); Conflict currentConflict = currentConflict(); if (!clazz.isInstance(currentConflict)) { throw new AssertionError( "Expected: " + clazz.getName() + " but found: " + ((currentConflict == null) ? "null" : currentConflict.getClass().getName())); } return this; }
/** * Add a place holder. * * @param key key * @param value value */ public void add(String key, Object value) { if (value instanceof ModelElementId) { value = decisionManager.getModelElement((ModelElementId) value); } values.put(key, value); }