@@ -0,0 +1,2010 @@
+/*%0A * Copyright 2016 Deutsche Nationalbibliothek%0A *%0A * Licensed under the Apache License, Version 2.0 the %22License%22;%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.culturegraph.mf.stream.pipe;%0A%0Aimport static org.mockito.Mockito.inOrder;%0Aimport static org.mockito.Mockito.verifyZeroInteractions;%0A%0Aimport org.culturegraph.mf.framework.StreamReceiver;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.InOrder;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0A%0A/**%0A * Tests for class %7B@link RecordBounderyRemover%7D.%0A *%0A * @author Christoph B%C3%B6hme%0A */%0Apublic class RecordBounderyRemoverTest %7B%0A%0A%09@Mock%0A%09private StreamReceiver receiver;%0A%0A%09private RecordBounderyRemover bounderyRemover;%0A%0A%09@Before%0A%09public void init() %7B%0A%09%09MockitoAnnotations.initMocks(this);%0A%09%09bounderyRemover = new RecordBounderyRemover();%0A%09%09bounderyRemover.setReceiver(receiver);%0A%09%7D%0A%0A%09@Test%0A%09public void shouldRemoveStartAndEndRecordEvents() %7B%0A%09%09bounderyRemover.startRecord(%221%22);%0A%09%09bounderyRemover.endRecord();%0A%0A%09%09verifyZeroInteractions(receiver);%0A%09%7D%0A%0A%09@Test%0A%09public void shouldForwardAllOtherEvents() %7B%0A%09%09bounderyRemover.startRecord(%221%22);%0A%09%09bounderyRemover.startEntity(%22entity%22);%0A%09%09bounderyRemover.literal(%22literal%22, %22value%22);%0A%09%09bounderyRemover.endEntity();%0A%09%09bounderyRemover.endRecord();%0A%09%09bounderyRemover.closeStream();%0A%0A%09%09final InOrder ordered = inOrder(receiver);%0A%09%09ordered.verify(receiver).startEntity(%22entity%22);%0A%09%09ordered.verify(receiver).literal(%22literal%22, %22value%22);%0A%09%09ordered.verify(receiver).endEntity();%0A%09%09ordered.verify(receiver).closeStream();%0A%09%7D%0A%0A%7D%0A

Add test cases for RecordBoundaryRemover