NexusMimeTypes { @Nullable public MimeRule getMimeRuleForExtension(String extension) { while (!extension.isEmpty()) { if (extensions.containsKey(extension)) { return extensions.get(extension); } extension = Files.getFileExtension(extension); } return null; } NexusMimeTypes(); @Nullable MimeRule getMimeRuleForExtension(String extension); static final String BUILTIN_MIMETYPES_FILENAME; static final String MIMETYPES_FILENAME; }
@Test public void unconfigured() { assertThat(underTest.getMimeRuleForExtension("test"), is(nullValue())); }