@@ -0,0 +1,1287 @@
+package org.hive2hive.core.model.versioned;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport net.tomp2p.peers.Number160;%0A%0Aimport org.hive2hive.core.H2HJUnitTest;%0Aimport org.hive2hive.core.model.UserCredentialsTest;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Apublic class BaseVersionedNetworkContentTest extends H2HJUnitTest %7B%0A%0A%09@BeforeClass%0A%09public static void initTest() throws Exception %7B%0A%09%09testClass = UserCredentialsTest.class;%0A%09%09beforeClass();%0A%09%7D%0A%0A%09@Test%0A%09public void testGenerateVersions() %7B%0A%09%09TestVersionedContent v0 = new TestVersionedContent();%0A%09%09assertEquals(Number160.ZERO, v0.getVersionKey());%0A%0A%09%09TestVersionedContent v1 = new TestVersionedContent();%0A%09%09v1.setVersionKey(v0.getVersionKey());%0A%09%09v1.generateVersionKey();%0A%09%09assertEquals(-1, v0.getVersionKey().compareTo(v1.getVersionKey()));%0A%0A%09%09TestVersionedContent v2 = new TestVersionedContent();%0A%09%09v2.setVersionKey(v1.getVersionKey());%0A%09%09v2.generateVersionKey();%0A%09%09assertEquals(-1, v1.getVersionKey().compareTo(v2.getVersionKey()));%0A%09%7D%0A%0A%09private class TestVersionedContent extends BaseVersionedNetworkContent %7B%0A%0A%09%09private static final long serialVersionUID = 1L;%0A%0A%09%09@Override%0A%09%09protected int getContentHash() %7B%0A%09%09%09return super.hashCode();%0A%09%09%7D%0A%0A%09%09@Override%0A%09%09public int getTimeToLive() %7B%0A%09%09%09return 100;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add BaseVersionedNetworkContentTest