test_class.declarator: mimeTypeMap
test_class.modifier: @Mock
      public
test_class.original_string: @Mock
      public MimeTypeMap mimeTypeMap;
test_class.type: MimeTypeMap
test_class.var_name: mimeTypeMap
test_class.declarator: mapper
test_class.modifier: private
test_class.original_string: private CollectThenSystemContentTypeMapper mapper;
test_class.type: CollectThenSystemContentTypeMapper
test_class.var_name: mapper
test_class.file: collect_app/src/test/java/org/odk/collect/android/http/CollectThenSystemContentTypeMapperTest.java
test_class.identifier: CollectThenSystemContentTypeMapperTest
test_case.body: @Test
      public void whenExtensionIsRecognized_returnsTypeForFile() {
          assertEquals("text/xml", mapper.map("file.xml"));
          assertEquals("audio/3gpp", mapper.map("file.3gpp"));
          assertEquals("video/3gpp", mapper.map("file.3gp"));
          assertEquals("video/avi", mapper.map("file.avi"));
          assertEquals("audio/amr", mapper.map("file.amr"));
          assertEquals("text/csv", mapper.map("file.csv"));
          assertEquals("image/jpeg", mapper.map("file.jpg"));
          assertEquals("audio/mp3", mapper.map("file.mp3"));
          assertEquals("video/mp4", mapper.map("file.mp4"));
          assertEquals("audio/ogg", mapper.map("file.oga"));
          assertEquals("audio/ogg", mapper.map("file.ogg"));
          assertEquals("video/ogg", mapper.map("file.ogv"));
          assertEquals("audio/wav", mapper.map("file.wav"));
          assertEquals("video/webm", mapper.map("file.webm"));
          assertEquals("application/vnd.ms-excel", mapper.map("file.xls"));
      }
test_case.class_method_signature: CollectThenSystemContentTypeMapperTest.whenExtensionIsRecognized_returnsTypeForFile()
test_case.full_signature: @Test public void whenExtensionIsRecognized_returnsTypeForFile()
test_case.identifier: whenExtensionIsRecognized_returnsTypeForFile
test_case.invocations: assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map assertEquals map
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void whenExtensionIsRecognized_returnsTypeForFile()
focal_class.declarator: androidTypeMap
focal_class.modifier: private final
focal_class.original_string: private final MimeTypeMap androidTypeMap;
focal_class.type: MimeTypeMap
focal_class.var_name: androidTypeMap
focal_class.file: collect_app/src/main/java/org/odk/collect/android/http/CollectThenSystemContentTypeMapper.java
focal_class.identifier: CollectThenSystemContentTypeMapper
focal_class.interfaces: implements OpenRosaHttpInterface.FileToContentTypeMapper
focal_class.class_method_signature: CollectThenSystemContentTypeMapper.CollectThenSystemContentTypeMapper(MimeTypeMap androidTypeMap)
focal_class.full_signature: public  CollectThenSystemContentTypeMapper(MimeTypeMap androidTypeMap)
focal_class.identifier: CollectThenSystemContentTypeMapper
focal_class.modifiers: public
focal_class.parameters: (MimeTypeMap androidTypeMap)
focal_class.signature:  CollectThenSystemContentTypeMapper(MimeTypeMap androidTypeMap)
focal_class.class_method_signature: CollectThenSystemContentTypeMapper.map(String fileName)
focal_class.full_signature: @NonNull @Override public String map(String fileName)
focal_class.identifier: map
focal_class.modifiers: @NonNull @Override public
focal_class.parameters: (String fileName)
focal_class.return: String
focal_class.signature: String map(String fileName)
focal_method.body: @NonNull
      @Override
      public String map(String fileName) {
          String extension = FileUtils.getFileExtension(fileName);
  
          String collectContentType = CollectContentTypeMappings.of(extension);
          String androidContentType = androidTypeMap.getMimeTypeFromExtension(extension);
  
          if (collectContentType != null) {
              return collectContentType;
          } else if (androidContentType != null) {
              return androidContentType;
          } else {
              return "application/octet-stream";
          }
      }
focal_method.class_method_signature: CollectThenSystemContentTypeMapper.map(String fileName)
focal_method.full_signature: @NonNull @Override public String map(String fileName)
focal_method.identifier: map
focal_method.invocations: getFileExtension of getMimeTypeFromExtension
focal_method.modifiers: @NonNull @Override public
focal_method.parameters: (String fileName)
focal_method.return: String
focal_method.signature: String map(String fileName)