public void validateRoutesConfig(RepositoryRouteResource resource)
throws IOException
{
CPathMappingItem cRoute = new NexusConfigUtil().getRoute(resource.getId());
String msg =
"Should be the same route. \n Expected:\n" + new XStream().toXML(resource) + " \n \n Got: \n"
+ new XStream().toXML(cRoute);
Assert.assertEquals(msg, cRoute.getId(), resource.getId());
Assert.assertEquals(msg, cRoute.getGroupId(), resource.getGroupId());
Assert.assertEquals(msg, cRoute.getRoutePatterns(), Collections.singletonList(resource.getPattern()));
Assert.assertEquals(msg, cRoute.getRouteType(), resource.getRuleType());
this.validateSameRepoIds(resource.getRepositories(), cRoute.getRepositories());
}