public void addObjectSink(final ObjectSink objectSink) {
        this.sink = this.sink.addObjectSink( objectSink, this.alphaNodeHashingThreshold, this.alphaNodeRangeIndexThreshold );
    }
@Test
    public void testAddObjectSink() throws Exception {
        final MockObjectSource source = new MockObjectSource( 15 );

        // We need to re-assign this var each time the sink changes references
        final Field field = ObjectSource.class.getDeclaredField( "sink" );
        field.setAccessible( true );
        ObjectSinkPropagator sink = (ObjectSinkPropagator) field.get( source );

        assertThat(sink).isSameAs(EmptyObjectSinkAdapter.getInstance());
        final MockObjectSink sink1 = new MockObjectSink();
        source.addObjectSink( sink1 );
        sink = (ObjectSinkPropagator) field.get( source );
        assertThat(sink).isInstanceOf(SingleObjectSinkAdapter.class);
        assertThat(sink.getSinks()).hasSize(1);

        final MockObjectSink sink2 = new MockObjectSink();
        source.addObjectSink( sink2 );
        sink = (ObjectSinkPropagator) field.get( source );
        assertThat(sink).isInstanceOf(CompositeObjectSinkAdapter.class);
        assertThat(sink.getSinks()).hasSize(2);

        final MockObjectSink sink3 = new MockObjectSink();
        source.addObjectSink( sink3 );
        assertThat(sink).isInstanceOf(CompositeObjectSinkAdapter.class);
        assertThat(sink.getSinks()).hasSize(3);

        source.removeObjectSink( sink2 );
        assertThat(sink).isInstanceOf(CompositeObjectSinkAdapter.class);
        assertThat(sink.getSinks()).hasSize(2);

        source.removeObjectSink( sink1 );
        sink = (ObjectSinkPropagator) field.get( source );
        assertThat(sink).isInstanceOf(SingleObjectSinkAdapter.class);
        assertThat(sink.getSinks()).hasSize(1);

        source.removeObjectSink( sink3 );
        sink = (ObjectSinkPropagator) field.get( source );
        assertThat(sink).isSameAs(EmptyObjectSinkAdapter.getInstance());
        assertThat(sink.getSinks()).hasSize(0);
    }