@Test public void getElementType() { ElementType sourceType = new ElementType( "foo", new Property("bar", DataType.INT)); ElementType targetType = new ElementType( "cat", new Property("dog", DataType.INT)); ElementReader reader = mock(ElementReader.class); when(reader.getElementType()).thenReturn(sourceType); TypeChangingElementReader target = new TypeChangingElementReader( reader, targetType); assertEquals(targetType, target.getElementType()); }
@Override public ElementType getElementType() { return targetType; }
TypeChangingElementReader implements ElementReader { @Override public ElementType getElementType() { return targetType; } }
TypeChangingElementReader implements ElementReader { @Override public ElementType getElementType() { return targetType; } TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType);   TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType,
            final Map<String, String> sourceNames); }
TypeChangingElementReader implements ElementReader { @Override public ElementType getElementType() { return targetType; } TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType);   TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType,
            final Map<String, String> sourceNames); @Override ElementType getElementType(); @Override int getCount(); @Override Element readElement(); @Override void close(); @Override boolean isClosed(); }
TypeChangingElementReader implements ElementReader { @Override public ElementType getElementType() { return targetType; } TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType);   TypeChangingElementReader(final ElementReader reader,
            final ElementType targetType,
            final Map<String, String> sourceNames); @Override ElementType getElementType(); @Override int getCount(); @Override Element readElement(); @Override void close(); @Override boolean isClosed();  }