DatabaseStorage implements Storage { @Override public String putProject(final ProjectStorageMetadata metadata, final File localFile) { this.projectLoader.uploadProjectFile(metadata.getProjectId(), metadata.getVersion(), localFile, metadata.getUploader(), metadata.getUploaderIPAddr()); return null; } @Inject  DatabaseStorage(final ProjectLoader projectLoader); @Override InputStream getProject(final String key); ProjectFileHandler getProject(final int projectId, final int version); @Override String putProject(final ProjectStorageMetadata metadata, final File localFile); @Override InputStream getDependency(final Dependency dep); @Override boolean dependencyFetchingEnabled(); @Override String getDependencyRootPath(); @Override boolean deleteProject(final String key);  }
@Test public void testPutProject() throws Exception { final File file = mock(File.class); final int projectId = 1234; final int version = 1; final String uploader = "testuser"; final ProjectStorageMetadata metadata = new ProjectStorageMetadata(projectId, version, uploader, null, IPv4); this.databaseStorage.putProject(metadata, file); verify(this.projectLoader).uploadProjectFile(projectId, version, file, uploader, IPv4); }