### Question:
YamlMappingSupplier implements RbacMappingSupplier { @Override public Map<String, Set<String>> get() { try { return loadMapping(); } catch (final Exception e) { throw new IllegalArgumentException("Couldn't load mapping from " + mappingLocation.getDescription(), e); } } YamlMappingSupplier(final Resource mappingLocation); @Override Map<String, Set<String>> get();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testMissingConfigFile() { final ClassPathResource mappingLocation = new ClassPathResource("doesNotExist"); new YamlMappingSupplier(mappingLocation).get(); fail(); }
@Test public void testLoadConfigFile() { final ClassPathResource mappingLocation = new ClassPathResource("rbac-test.yaml"); final Map<String, Set<String>> mapping = new YamlMappingSupplier(mappingLocation).get(); assertThat(mapping.size(), is(3)); assertThat(mapping.containsKey("ADMIN"), is(true)); assertThat(mapping.containsKey("USER"), is(true)); assertThat(mapping.containsKey("NONE"), is(true)); }