CMDIComponentProfileNamePostNormalizer extends AbstractPostNormalizer { @Override public List<String> process(String profileId, DocFieldContainer cmdiData) { if (profileId != null) { return cache.computeIfAbsent(profileId, (key) -> { try { return Collections.singletonList(calculate(key)); } catch (IOException ex) { LOG.error("Error while looking up profile name for profile {}", profileId, ex); return null; } }); } else { return Collections.singletonList(""); } } CMDIComponentProfileNamePostNormalizer(VloConfig config); @Override List<String> process(String profileId, DocFieldContainer cmdiData); @Override boolean doesProcessNoValue();  }
@Test public void testProcess() { List<String> result = instance.process("clarin.eu:cr1:p_1282306194508", null); assertNotNull(result); assertEquals(1, result.size()); assertEquals("teiHeader", result.get(0)); }
@Test public void testProcessNonExistingProfile() { List<String> result = instance.process("clarin.xx:cr1:p_1282zzz", null); assertNull(result); }