@Test public void should_map_file_lookup() throws Exception { mockFileLookup(); FileResource resource = mapper.transform(mFileLookup); assertThat(resource.getType(), is(FileResource.Type.pdf)); }
@Override public FileResource transform(FileLookup lookup) { FileResource.Builder builder = new FileResource.Builder(); AbstractResourceBuilder abstractResourceBuilder = builder.addResource(); buildLookup(abstractResourceBuilder, lookup); FileResource.Type type = FileResource.Type.valueOf(lookup.getType()); builder.withFileType(type); return builder.build(); }
FileResourceMapper extends AbstractResourceMapper<FileResource, FileLookup> { @Override public FileResource transform(FileLookup lookup) { FileResource.Builder builder = new FileResource.Builder(); AbstractResourceBuilder abstractResourceBuilder = builder.addResource(); buildLookup(abstractResourceBuilder, lookup); FileResource.Type type = FileResource.Type.valueOf(lookup.getType()); builder.withFileType(type); return builder.build(); } }
FileResourceMapper extends AbstractResourceMapper<FileResource, FileLookup> { @Override public FileResource transform(FileLookup lookup) { FileResource.Builder builder = new FileResource.Builder(); AbstractResourceBuilder abstractResourceBuilder = builder.addResource(); buildLookup(abstractResourceBuilder, lookup); FileResource.Type type = FileResource.Type.valueOf(lookup.getType()); builder.withFileType(type); return builder.build(); } FileResourceMapper(@NotNull SimpleDateFormat format, @Nullable ResourceType backupType);  FileResourceMapper(@NotNull SimpleDateFormat format); }
FileResourceMapper extends AbstractResourceMapper<FileResource, FileLookup> { @Override public FileResource transform(FileLookup lookup) { FileResource.Builder builder = new FileResource.Builder(); AbstractResourceBuilder abstractResourceBuilder = builder.addResource(); buildLookup(abstractResourceBuilder, lookup); FileResource.Type type = FileResource.Type.valueOf(lookup.getType()); builder.withFileType(type); return builder.build(); } FileResourceMapper(@NotNull SimpleDateFormat format, @Nullable ResourceType backupType);  FileResourceMapper(@NotNull SimpleDateFormat format); @Override FileResource transform(FileLookup lookup); }
FileResourceMapper extends AbstractResourceMapper<FileResource, FileLookup> { @Override public FileResource transform(FileLookup lookup) { FileResource.Builder builder = new FileResource.Builder(); AbstractResourceBuilder abstractResourceBuilder = builder.addResource(); buildLookup(abstractResourceBuilder, lookup); FileResource.Type type = FileResource.Type.valueOf(lookup.getType()); builder.withFileType(type); return builder.build(); } FileResourceMapper(@NotNull SimpleDateFormat format, @Nullable ResourceType backupType);  FileResourceMapper(@NotNull SimpleDateFormat format); @Override FileResource transform(FileLookup lookup);  }