@@ -0,0 +1,1383 @@
+package de.cronn.proxy.ssh;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Aimport com.jcraft.jsch.HostKey;%0A%0Apublic class HostKeyTypeTest %7B%0A%0A%09@Test%0A%09public void testGetType() throws Exception %7B%0A%09%09assertEquals(HostKey.SSHRSA, HostKeyType.SSH_RSA.getType());%0A%09%09assertEquals(HostKey.SSHDSS, HostKeyType.SSH_DSS.getType());%0A%0A%09%09for (HostKeyType hostKeyType : HostKeyType.values()) %7B%0A%09%09%09assertTrue(hostKeyType.getType() %3E 0);%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void testGetTypeString() throws Exception %7B%0A%09%09assertEquals(%22ssh-rsa%22, HostKeyType.SSH_RSA.getTypeString());%0A%09%09assertEquals(%22ssh-dss%22, HostKeyType.SSH_DSS.getTypeString());%0A%0A%09%09for (HostKeyType hostKeyType : HostKeyType.values()) %7B%0A%09%09%09assertNotNull(hostKeyType.getTypeString());%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void testByTypeString() throws Exception %7B%0A%09%09assertEquals(HostKeyType.SSH_RSA, HostKeyType.byTypeString(%22ssh-rsa%22));%0A%09%09assertEquals(HostKeyType.SSH_DSS, HostKeyType.byTypeString(%22ssh-dss%22));%0A%0A%09%09try %7B%0A%09%09%09HostKeyType.byTypeString(null);%0A%09%09%09fail(%22IllegalArgumentException expected%22);%0A%09%09%7D catch (IllegalArgumentException e) %7B%0A%09%09%09assertEquals(%22No hostKeyType found for null%22, e.getMessage());%0A%09%09%7D%0A%0A%09%09try %7B%0A%09%09%09HostKeyType.byTypeString(%22ssh-does-not-exist%22);%0A%09%09%09fail(%22IllegalArgumentException expected%22);%0A%09%09%7D catch (IllegalArgumentException e) %7B%0A%09%09%09assertEquals(%22No hostKeyType found for ssh-does-not-exist%22, e.getMessage());%0A%09%09%7D%0A%09%7D%0A%0A%7D

add unit test for HostKeyType