Parameters implements Cloneable, Serializable { public <S> Object[] getKeyValues(final Traverser.Admin<S> traverser, final Object... exceptKeys) { if (this.parameters.isEmpty()) return EMPTY_ARRAY; final List<Object> keyValues = new ArrayList<>(); for (final Map.Entry<Object, List<Object>> entry : this.parameters.entrySet()) { if (!ArrayUtils.contains(exceptKeys, entry.getKey())) { for (final Object value : entry.getValue()) { keyValues.add(entry.getKey() instanceof Traversal.Admin ? TraversalUtil.apply(traverser, (Traversal.Admin<S, ?>) entry.getKey()) : entry.getKey()); keyValues.add(value instanceof Traversal.Admin ? TraversalUtil.apply(traverser, (Traversal.Admin<S, ?>) value) : value); } } } return keyValues.toArray(new Object[keyValues.size()]); }  boolean contains(final Object key); boolean contains(final Object key, final Object value); void rename(final Object oldKey, final Object newKey); List<E> get(final Traverser.Admin<S> traverser, final Object key, final Supplier<E> defaultValue); List<E> get(final Object key, final Supplier<E> defaultValue); Object remove(final Object key); Object[] getKeyValues(final Traverser.Admin<S> traverser, final Object... exceptKeys); Map<Object, List<Object>> getRaw(final Object... exceptKeys); void set(final TraversalParent parent, final Object... keyValues); List<Traversal.Admin<S, E>> getTraversals(); Set<String> getReferencedLabels(); Parameters clone(); int hashCode(); String toString(); static final Parameters EMPTY; }
@Test public void shouldGetKeyValuesEmpty() { final Parameters parameters = new Parameters(); assertThat(Arrays.equals(parameters.getKeyValues(mock(Traverser.Admin.class)), new Object[0]), is(true)); }