@Test
public void testRegisterStyle() throws Exception {

	NamedStyleInfo nsi = new NamedStyleInfo();
	nsi.setName("test");
	RegisterNamedStyleInfoRequest req = new RegisterNamedStyleInfoRequest();
	req.setLayerId("countries");
	req.setNamedStyleInfo(nsi);
	CommandResponse response = dispatcher.execute(
			RegisterNamedStyleInfoRequest.COMMAND, req, null, "en");
	
	if (response.isError()) {
		response.getErrors().get(0).printStackTrace();
	}
	Assert.assertFalse(response.isError());
	Assert.assertTrue(response instanceof RegisterNamedStyleInfoResponse);
	Assert.assertEquals(nsi, styleService.retrieveStyle("countries", ((RegisterNamedStyleInfoResponse) response).getStyleName()));
}