Change name of mimeTypeToImageType to getImageTypeForMimeType. Change setResourceFromString to private. Add imageType public getter method for unit tests.