@@ -0,0 +1,1176 @@
+package org.apache.cassandra.db;%0A%0Aimport java.net.InetAddress;%0Aimport java.net.UnknownHostException;%0A%0Aimport com.google.common.base.Charsets;%0Aimport org.junit.Test;%0A%0Aimport org.apache.cassandra.dht.BytesToken;%0Aimport org.apache.cassandra.utils.ByteBufferUtil;%0A%0Apublic class SystemTableTest%0A%7B%0A    @Test%0A    public void testLocalToken()%0A    %7B%0A        SystemTable.updateToken(new BytesToken(ByteBufferUtil.bytes(%22token%22)));%0A        assert new String(((BytesToken) SystemTable.getSavedToken()).token, Charsets.UTF_8).equals(%22token%22);%0A%0A        SystemTable.updateToken(new BytesToken(ByteBufferUtil.bytes(%22token2%22)));%0A        assert new String(((BytesToken) SystemTable.getSavedToken()).token, Charsets.UTF_8).equals(%22token2%22);%0A    %7D%0A%0A    @Test%0A    public void testNonLocalToken() throws UnknownHostException%0A    %7B%0A        BytesToken token = new BytesToken(ByteBufferUtil.bytes(%22token3%22));%0A        InetAddress address = InetAddress.getByName(%22127.0.0.2%22);%0A        SystemTable.updateToken(address, token);%0A        assert SystemTable.loadTokens().get(token).equals(address);%0A        SystemTable.removeToken(token);%0A        assert !SystemTable.loadTokens().containsKey(token);%0A    %7D%0A%7D%0A

add SystemTableTest