test_class.declarator: providers
test_class.modifier: private
test_class.original_string: private Providers                             providers;
test_class.type: Providers
test_class.var_name: providers
test_class.declarator: mapMultipartFormDataMessageBodyReader
test_class.modifier: private
test_class.original_string: private MapMultipartFormDataMessageBodyReader mapMultipartFormDataMessageBodyReader;
test_class.type: MapMultipartFormDataMessageBodyReader
test_class.var_name: mapMultipartFormDataMessageBodyReader
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/multipart/MapMultipartFormDataMessageBodyReaderTest.java
test_class.identifier: MapMultipartFormDataMessageBodyReaderTest
test_case.body: @Test
      public void readsMapOfInputItems() throws Exception {
          Class type = Map.class;
          ParameterizedType genericType = newParameterizedType(Map.class, String.class, InputItem.class);
          Annotation[] annotations = new Annotation[0];
          MediaType mediaType = MULTIPART_FORM_DATA_TYPE;
          MultivaluedMap<String, String> headers = new MultivaluedHashMap<>();
          InputStream in = mock(InputStream.class);
  
          FileItem fileItem = createFileItem("fileItem1");
          MessageBodyReader fileItemReader = createFileItemMessageBodyReader(annotations, mediaType, headers, in, fileItem);
          when(providers.getMessageBodyReader(eq(Iterator.class), eq(newParameterizedType(Iterator.class, FileItem.class)), aryEq(annotations), eq(mediaType)))
                  .thenReturn(fileItemReader);
  
          Map<String, InputItem> inputItems = mapMultipartFormDataMessageBodyReader.readFrom(type, genericType, annotations, mediaType, headers, in);
          assertEquals(1, inputItems.size());
          assertEquals(fileItem.getFieldName(), inputItems.get(fileItem.getFieldName()).getName());
      }
test_case.class_method_signature: MapMultipartFormDataMessageBodyReaderTest.readsMapOfInputItems()
test_case.full_signature: @Test public void readsMapOfInputItems()
test_case.identifier: readsMapOfInputItems
test_case.invocations: newParameterizedType mock createFileItem createFileItemMessageBodyReader thenReturn when getMessageBodyReader eq eq newParameterizedType aryEq eq readFrom assertEquals size assertEquals getFieldName getName get getFieldName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void readsMapOfInputItems()
focal_class.declarator: providers
focal_class.modifier: private final
focal_class.original_string: private final Providers providers;
focal_class.type: Providers
focal_class.var_name: providers
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/multipart/MapMultipartFormDataMessageBodyReader.java
focal_class.identifier: MapMultipartFormDataMessageBodyReader
focal_class.interfaces: implements MessageBodyReader<Map<String, InputItem>>
focal_class.class_method_signature: MapMultipartFormDataMessageBodyReader.MapMultipartFormDataMessageBodyReader(@Context Providers providers)
focal_class.full_signature: public  MapMultipartFormDataMessageBodyReader(@Context Providers providers)
focal_class.identifier: MapMultipartFormDataMessageBodyReader
focal_class.modifiers: public
focal_class.parameters: (@Context Providers providers)
focal_class.signature:  MapMultipartFormDataMessageBodyReader(@Context Providers providers)
focal_class.class_method_signature: MapMultipartFormDataMessageBodyReader.isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.full_signature: @Override public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.identifier: isReadable
focal_class.modifiers: @Override public
focal_class.parameters: (Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.return: boolean
focal_class.signature: boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
focal_class.class_method_signature: MapMultipartFormDataMessageBodyReader.readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.full_signature: @Override public Map<String, InputItem> readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.identifier: readFrom
focal_class.modifiers: @Override public
focal_class.parameters: (Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_class.return: Map<String, InputItem>
focal_class.signature: Map<String, InputItem> readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_method.body: @Override
      public Map<String, InputItem> readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
              throws IOException, WebApplicationException {
          final Type genericSuperclass = ParameterizedTypeImpl.newParameterizedType(Iterator.class, FileItem.class);
          final MessageBodyReader<Iterator> multipartReader =
                  providers.getMessageBodyReader(Iterator.class, genericSuperclass, annotations, mediaType);
          final Iterator iterator =
                  multipartReader.readFrom(Iterator.class, genericSuperclass, annotations, mediaType, httpHeaders, entityStream);
          final Map<String, InputItem> result = new LinkedHashMap<>();
          while (iterator.hasNext()) {
              final DefaultInputItem item = new DefaultInputItem((FileItem)iterator.next(), providers);
              result.put(item.getName(), item);
          }
          return result;
      }
focal_method.class_method_signature: MapMultipartFormDataMessageBodyReader.readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_method.full_signature: @Override public Map<String, InputItem> readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_method.identifier: readFrom
focal_method.invocations: newParameterizedType getMessageBodyReader readFrom hasNext next put getName
focal_method.modifiers: @Override public
focal_method.parameters: (Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
focal_method.return: Map<String, InputItem>
focal_method.signature: Map<String, InputItem> readFrom(Class<Map<String, InputItem>> type, Type genericType, Annotation[] annotations,
                                             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)