@Test
public void testPut() throws Exception {

  StoragePath storagePath = new StoragePath(ORG_ID, MP_ID, VERSION_1, MP_ELEM_ID);
  repo.put(storagePath, Source.mk(getClass().getClassLoader().getResource(FILE_NAME).toURI()));
  File file = new File(PathSupport.concat(new String[] { tmpRoot.toString(), ORG_ID, MP_ID, VERSION_1.toString() }));
  assertTrue(file + " should be a directory", file.isDirectory());
  assertTrue(file.listFiles().length == 1);
  InputStream original = null;
  FileInputStream fileInput = null;
  try {
    fileInput = new FileInputStream(file.listFiles()[0]);
    original = getClass().getClassLoader().getResourceAsStream(FILE_NAME);
    byte[] bytesFromRepo = IOUtils.toByteArray(fileInput);
    byte[] bytesFromClasspath = IOUtils.toByteArray(original);
    assertArrayEquals(bytesFromClasspath, bytesFromRepo);
  } finally {
    IOUtils.closeQuietly(original);
    IOUtils.closeQuietly(fileInput);
  }
}