@Test
public void testGetSshKeyReqType() {

    CloudStore cloudStore = new CloudStore();
    final String req = "{\"principals\":[\"localhost\"],\"pubkey\":\"ssh-rsa AAAs\"" +
            ",\"reqip\":\"10.10.10.10\",\"requser\":\"user\",\"certtype\":\"host\",\"transid\":\"0\"}";
    assertEquals(cloudStore.getSshKeyReqType(req), "host");
    final String req2 = "{\"principals\":[\"localhost\"],\"pubkey\":\"ssh-rsa AAAs\"" +
            ",\"reqip\":\"10.10.10.10\",\"requser\":\"user\",\"certtype2\":\"host\",\"transid\":\"0\"}";
    assertNull(cloudStore.getSshKeyReqType(req2));
    final String req3 = "{invalid-json";
    assertNull(cloudStore.getSshKeyReqType(req3));
    cloudStore.close();
}