test_class.declarator: size
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Expression<Integer, Resolver> size;
test_class.type: Expression<Integer, Resolver>
test_class.var_name: size
test_class.declarator: map
test_class.modifier: private final
test_class.original_string: private final Map<Long, Direction> map;
test_class.type: Map<Long, Direction>
test_class.var_name: map
test_class.declarator: channel
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BitChannel channel;
test_class.type: BitChannel
test_class.var_name: channel
test_class.declarator: resolver
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Resolver resolver;
test_class.type: Resolver
test_class.var_name: resolver
test_class.file: preon-binding/src/test/java/org/codehaus/preon/codec/EnumCodecTest.java
test_class.identifier: EnumCodecTest
test_case.body: @Test
      public void shouldEncodeCorrectly() throws IOException {
          int nrbits = 2;
          EnumCodec<Direction> codec = new EnumCodec<Direction>(Direction.class, map, size, BigEndian);
          when(size.eval(org.mockito.Matchers.any(Resolver.class))).thenReturn(nrbits);
          codec.encode(Direction.Backward, channel, resolver);
          verify(channel).write(nrbits, 2L, BigEndian);
          verifyNoMoreInteractions(channel);
          verifyNoMoreInteractions(resolver);
      }
test_case.class_method_signature: EnumCodecTest.shouldEncodeCorrectly()
test_case.full_signature: @Test public void shouldEncodeCorrectly()
test_case.identifier: shouldEncodeCorrectly
test_case.invocations: thenReturn when eval any encode write verify verifyNoMoreInteractions verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldEncodeCorrectly()
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final Class<T> type;
focal_class.type: Class<T>
focal_class.var_name: type
focal_class.declarator: mapping
focal_class.modifier: private final
focal_class.original_string: private final Map<Long, T> mapping;
focal_class.type: Map<Long, T>
focal_class.var_name: mapping
focal_class.declarator: inverseMapping
focal_class.modifier: private final
focal_class.original_string: private final Map<T, Long> inverseMapping;
focal_class.type: Map<T, Long>
focal_class.var_name: inverseMapping
focal_class.declarator: size
focal_class.modifier: private final
focal_class.original_string: private final Expression<Integer, Resolver> size;
focal_class.type: Expression<Integer, Resolver>
focal_class.var_name: size
focal_class.declarator: byteOrder
focal_class.modifier: private final
focal_class.original_string: private final ByteOrder byteOrder;
focal_class.type: ByteOrder
focal_class.var_name: byteOrder
focal_class.file: preon-binding/src/main/java/org/codehaus/preon/codec/EnumCodec.java
focal_class.identifier: EnumCodec
focal_class.interfaces: implements Codec<T>
focal_class.class_method_signature: EnumCodec.EnumCodec(Class<T> type, Map<Long, T> mapping,
                       Expression<Integer, Resolver> sizeExpr, ByteOrder endian)
focal_class.full_signature: public  EnumCodec(Class<T> type, Map<Long, T> mapping,
                       Expression<Integer, Resolver> sizeExpr, ByteOrder endian)
focal_class.identifier: EnumCodec
focal_class.modifiers: public
focal_class.parameters: (Class<T> type, Map<Long, T> mapping,
                       Expression<Integer, Resolver> sizeExpr, ByteOrder endian)
focal_class.signature:  EnumCodec(Class<T> type, Map<Long, T> mapping,
                       Expression<Integer, Resolver> sizeExpr, ByteOrder endian)
focal_class.class_method_signature: EnumCodec.decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.full_signature: public T decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.identifier: decode
focal_class.modifiers: public
focal_class.parameters: (BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.return: T
focal_class.signature: T decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.class_method_signature: EnumCodec.encode(T object, BitChannel channel, Resolver resolver)
focal_class.full_signature: public void encode(T object, BitChannel channel, Resolver resolver)
focal_class.identifier: encode
focal_class.modifiers: public
focal_class.parameters: (T object, BitChannel channel, Resolver resolver)
focal_class.return: void
focal_class.signature: void encode(T object, BitChannel channel, Resolver resolver)
focal_class.class_method_signature: EnumCodec.getTypes()
focal_class.full_signature: public Class<?>[] getTypes()
focal_class.identifier: getTypes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class<?>[]
focal_class.signature: Class<?>[] getTypes()
focal_class.class_method_signature: EnumCodec.getSize()
focal_class.full_signature: public Expression<Integer, Resolver> getSize()
focal_class.identifier: getSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Expression<Integer, Resolver>
focal_class.signature: Expression<Integer, Resolver> getSize()
focal_class.class_method_signature: EnumCodec.getType()
focal_class.full_signature: public Class<?> getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getType()
focal_class.class_method_signature: EnumCodec.getCodecDescriptor()
focal_class.full_signature: public CodecDescriptor getCodecDescriptor()
focal_class.identifier: getCodecDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: CodecDescriptor
focal_class.signature: CodecDescriptor getCodecDescriptor()
focal_method.body: public void encode(T object, BitChannel channel, Resolver resolver) throws IOException {
          channel.write(size.eval(resolver), inverseMapping.get(object), byteOrder);
      }
focal_method.class_method_signature: EnumCodec.encode(T object, BitChannel channel, Resolver resolver)
focal_method.full_signature: public void encode(T object, BitChannel channel, Resolver resolver)
focal_method.identifier: encode
focal_method.invocations: write eval get
focal_method.modifiers: public
focal_method.parameters: (T object, BitChannel channel, Resolver resolver)
focal_method.return: void
focal_method.signature: void encode(T object, BitChannel channel, Resolver resolver)