IteratorSettingBuilder { public IteratorSettingBuilder view(final View view) { try { setting.addOption(AccumuloStoreConstants.VIEW, new String(view.toCompactJson(), CommonConstants.UTF_8)); } catch (final UnsupportedEncodingException e) { throw new SchemaException("Unable to deserialise view from JSON", e); } return this; } IteratorSettingBuilder(final IteratorSetting setting);  IteratorSettingBuilder(final int priority, final String name,
                                  final Class<? extends SortedKeyValueIterator<Key, Value>> iteratorClass);  IteratorSettingBuilder(final int priority, final String name, final String iteratorClass); IteratorSettingBuilder option(final String option, final String value); IteratorSettingBuilder all(); IteratorSettingBuilder columnFamily(final String columnFamily); IteratorSettingBuilder combinerColumnFamilies(final List<String> columnFamilies); IteratorSettingBuilder bloomFilter(final BloomFilter filter); IteratorSettingBuilder includeEdges(final boolean includeEdges); IteratorSettingBuilder directedType(final DirectedType directedType); IteratorSettingBuilder includeIncomingOutgoing(
            final SeededGraphFilters.IncludeIncomingOutgoingType includeIncomingOutGoing); IteratorSettingBuilder includeEntities(final boolean includeEntities); IteratorSettingBuilder deduplicateUndirectedEdges(final boolean deduplicateUndirectedEdges); IteratorSettingBuilder schema(final Schema schema); IteratorSettingBuilder view(final View view); IteratorSettingBuilder keyConverter(final Class<? extends AccumuloElementConverter> converter); IteratorSettingBuilder keyConverter(final AccumuloElementConverter converter); IteratorSetting build();  }
@Test public void shouldAddCompactViewToIteratorSetting() throws Exception { final IteratorSetting setting = mock(IteratorSetting.class); final View view = mock(View.class); final String compactSchemaJson = "CompactSchema"; given(view.toCompactJson()).willReturn(compactSchemaJson.getBytes()); new IteratorSettingBuilder(setting).view(view); verify(setting).addOption(AccumuloStoreConstants.VIEW, compactSchemaJson); }