@Test
public void testLoadOverrides() {
Set<String> overrides = Overrides.loadOverrides(getClass().getResource("overrides.properties").toExternalForm());
assertEquals(2, overrides.size());
Clause karafAdminCommand = null;
Clause karafAdminCore = null;
for (Clause clause : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) {
if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.3.0.redhat-61033X")) {
karafAdminCommand = clause;
}
if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.core/2.3.0.redhat-61033X")) {
karafAdminCore = clause;
}
}
assertNotNull("Missing admin.command bundle override", karafAdminCommand);
assertNotNull("Missing admin.core bundle override", karafAdminCore);
assertNotNull("Missing range on admin.core override", karafAdminCore.getAttribute(Overrides.OVERRIDE_RANGE));
}