* Tests that if we do not change anything in an {@link InputStream} while committing data, that the version is not
* bumped for a repository.
*/
@Test(groups = { UNIT })
public void testCheckoutAndCommitWithoutChangeDoesNotChangeVersion() throws Exception {
SortedRangeSet range;
RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true);
InputStream data = new ByteArrayInputStream("abc".getBytes());
assertTrue(repo.put(data, 1), "Put should have succeeded");
range = repo.getRange();
assertEquals(1, range.getHigh(), "Version 1 should be the most recent one");
InputStream is = repo.checkout(1);
assertFalse(repo.commit(is, 1), "Commit should be ignored");
range = repo.getRange();
assertEquals(1, range.getHigh(), "Version 1 should still be the most recent one");
}