@Test void registerNullPointer() { assertThrows(NullPointerException.class, () -> entityListenersService.register(null)); }
void register(String repoFullName) { lock.writeLock().lock(); try { if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) { entityListenersByRepo.put(repoFullName, HashMultimap.create()); } } finally { lock.writeLock().unlock(); } }
EntityListenersService { void register(String repoFullName) { lock.writeLock().lock(); try { if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) { entityListenersByRepo.put(repoFullName, HashMultimap.create()); } } finally { lock.writeLock().unlock(); } } }
EntityListenersService { void register(String repoFullName) { lock.writeLock().lock(); try { if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) { entityListenersByRepo.put(repoFullName, HashMultimap.create()); } } finally { lock.writeLock().unlock(); } }  }
EntityListenersService { void register(String repoFullName) { lock.writeLock().lock(); try { if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) { entityListenersByRepo.put(repoFullName, HashMultimap.create()); } } finally { lock.writeLock().unlock(); } }  void addEntityListener(String repoFullName, EntityListener entityListener); boolean removeEntityListener(String repoFullName, EntityListener entityListener); }
EntityListenersService { void register(String repoFullName) { lock.writeLock().lock(); try { if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) { entityListenersByRepo.put(repoFullName, HashMultimap.create()); } } finally { lock.writeLock().unlock(); } }  void addEntityListener(String repoFullName, EntityListener entityListener); boolean removeEntityListener(String repoFullName, EntityListener entityListener);  }