DummyCoreServer mbean = new DummyCoreServer();
prepareCustomServerService(mbean, CoreServerMBean.OBJECT_NAME);
// in order to register, we need to mock out the agent version file used by the server
// to determine the agent version it supports.
agentVersion = new AgentVersion(VERSION, BUILD);
File agentVersionFile = new File(mbean.getJBossServerDataDir(), DOWNLOADS_AGENT + "/" + SERVER_AGENT_PROPERTIES);
agentVersionFile.getParentFile().mkdirs();
agentVersionFile.delete();
Properties agentVersionProps = new Properties();
agentVersionProps.put(AGENT_VERSION, agentVersion.getVersion());