try {
client = new SimpleClient("log4j.properties");
client.connect("localhost", PORT);
client.login("testUsername", "password");
RPObject template = new RPObject();
template.put("client", "junit");
CharacterResult res = client.createCharacter("testCharacter",
template);
assertEquals(res.getResult(), Result.OK_CREATED);
assertEquals("testCharacter", res.getCharacter());
RPObject result = res.getTemplate();
assertTrue(result.has("client"));
assertEquals("junit", result.get("client"));
assertTrue(result.has("name"));
assertEquals("testCharacter", result.get("name"));
String[] characters = client.getCharacters();
assertEquals(1, characters.length);
assertEquals("testCharacter", characters[0]);
client.close();