test_class.declarator: listCodec
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Codec<List<Map.Entry<String,Integer>>> listCodec;
test_class.type: Codec<List<Map.Entry<String,Integer>>>
test_class.var_name: listCodec
test_class.declarator: item1
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Map.Entry<String,Integer> item1;
test_class.type: Map.Entry<String,Integer>
test_class.var_name: item1
test_class.declarator: item2
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Map.Entry<String,Integer> item2;
test_class.type: Map.Entry<String,Integer>
test_class.var_name: item2
test_class.declarator: buffer
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BitBuffer buffer;
test_class.type: BitBuffer
test_class.var_name: buffer
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.declarator: builder
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Builder builder;
test_class.type: Builder
test_class.var_name: builder
test_class.file: preon-binding/src/test/java/org/codehaus/preon/codec/ListBasedMapCodecTest.java
test_class.identifier: ListBasedMapCodecTest
test_case.body: @Test
      public void shouldWorkWithNormalList() throws DecodingException {
          when(listCodec.decode(any(BitBuffer.class), any(Resolver.class), any(Builder.class)))
                  .thenReturn(Arrays.asList(item1, item2));
          when(item1.getKey()).thenReturn("foo");
          when(item1.getValue()).thenReturn(1);
          when(item2.getKey()).thenReturn("bar");
          when(item2.getValue()).thenReturn(2);
          ListBasedMapCodec<String,Integer> codec = new ListBasedMapCodec<String, Integer>(listCodec);
          Map<String, Integer> map = codec.decode(buffer, resolver, builder);
          assertThat(map.size(), is(2));
          assertThat(map, hasEntry("foo", 1));
          assertThat(map, hasEntry("bar", 2));
          verify(listCodec).decode(buffer, resolver, builder);
          Mockito.verifyNoMoreInteractions(listCodec);        
      }
test_case.class_method_signature: ListBasedMapCodecTest.shouldWorkWithNormalList()
test_case.full_signature: @Test public void shouldWorkWithNormalList()
test_case.identifier: shouldWorkWithNormalList
test_case.invocations: thenReturn when decode any any any asList thenReturn when getKey thenReturn when getValue thenReturn when getKey thenReturn when getValue decode assertThat size is assertThat hasEntry assertThat hasEntry decode verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldWorkWithNormalList()
focal_class.declarator: listCodec
focal_class.modifier: private final
focal_class.original_string: private final Codec<List<Map.Entry<K, V>>> listCodec;
focal_class.type: Codec<List<Map.Entry<K, V>>>
focal_class.var_name: listCodec
focal_class.file: preon-binding/src/main/java/org/codehaus/preon/codec/ListBasedMapCodec.java
focal_class.identifier: ListBasedMapCodec
focal_class.interfaces: implements Codec<Map<K,V>>
focal_class.class_method_signature: ListBasedMapCodec.ListBasedMapCodec(Codec<List<Map.Entry<K,V>>> listCodec)
focal_class.full_signature: public  ListBasedMapCodec(Codec<List<Map.Entry<K,V>>> listCodec)
focal_class.identifier: ListBasedMapCodec
focal_class.modifiers: public
focal_class.parameters: (Codec<List<Map.Entry<K,V>>> listCodec)
focal_class.signature:  ListBasedMapCodec(Codec<List<Map.Entry<K,V>>> listCodec)
focal_class.class_method_signature: ListBasedMapCodec.decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.full_signature: public Map<K,V> 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: Map<K,V>
focal_class.signature: Map<K,V> decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_class.class_method_signature: ListBasedMapCodec.encode(Map value, BitChannel channel, Resolver resolver)
focal_class.full_signature: public void encode(Map value, BitChannel channel, Resolver resolver)
focal_class.identifier: encode
focal_class.modifiers: public
focal_class.parameters: (Map value, BitChannel channel, Resolver resolver)
focal_class.return: void
focal_class.signature: void encode(Map value, BitChannel channel, Resolver resolver)
focal_class.class_method_signature: ListBasedMapCodec.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: ListBasedMapCodec.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_class.class_method_signature: ListBasedMapCodec.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: ListBasedMapCodec.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_method.body: public Map<K,V> decode(BitBuffer buffer, Resolver resolver, Builder builder) throws DecodingException {
          List<? extends Map.Entry<K, V>> entries = listCodec.decode(buffer, resolver, builder);
          Map<K,V> result = new HashMap(entries.size());
          for (Map.Entry<K, V> entry : entries) {
              result.put(entry.getKey(), entry.getValue());
          }
          return result;
      }
focal_method.class_method_signature: ListBasedMapCodec.decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_method.full_signature: public Map<K,V> decode(BitBuffer buffer, Resolver resolver, Builder builder)
focal_method.identifier: decode
focal_method.invocations: decode size put getKey getValue
focal_method.modifiers: public
focal_method.parameters: (BitBuffer buffer, Resolver resolver, Builder builder)
focal_method.return: Map<K,V>
focal_method.signature: Map<K,V> decode(BitBuffer buffer, Resolver resolver, Builder builder)