### Question:
NodeLocalConfigPermissioningController implements NodePermissioningProvider { public List<String> getNodesAllowlist() { return nodesAllowlist.stream().map(Object::toString).collect(Collectors.toList()); } NodeLocalConfigPermissioningController(
      final LocalPermissioningConfiguration permissioningConfiguration,
      final List<EnodeURL> fixedNodes,
      final Bytes localNodeId,
      final MetricsSystem metricsSystem);  NodeLocalConfigPermissioningController(
      final LocalPermissioningConfiguration configuration,
      final List<EnodeURL> fixedNodes,
      final Bytes localNodeId,
      final AllowlistPersistor allowlistPersistor,
      final MetricsSystem metricsSystem); NodesAllowlistResult addNodes(final List<String> enodeURLs); boolean addNode(final EnodeURL enodeURL); NodesAllowlistResult removeNodes(final List<String> enodeURLs); boolean isPermitted(final String enodeURL); boolean isPermitted(final EnodeURL node); List<String> getNodesAllowlist(); synchronized void reload(); long subscribeToListUpdatedEvent(final Consumer<NodeAllowlistUpdatedEvent> subscriber); @Override boolean isPermitted(final EnodeURL sourceEnode, final EnodeURL destinationEnode);  }### Answer:
@Test @SuppressWarnings("unchecked") public void getNodeAllowlistShouldWorkWhenOnlyDnsEnabled() throws Exception { final Path permissionsFile = createPermissionsFileWithNode(enodeDns); final LocalPermissioningConfiguration permissioningConfig = mock(LocalPermissioningConfiguration.class); final EnodeDnsConfiguration enodeDnsConfiguration = ImmutableEnodeDnsConfiguration.builder().dnsEnabled(true).updateEnabled(false).build(); when(permissioningConfig.getNodePermissioningConfigFilePath()) .thenReturn(permissionsFile.toAbsolutePath().toString()); when(permissioningConfig.isNodeAllowlistEnabled()).thenReturn(true); when(permissioningConfig.getNodeAllowlist()) .thenReturn(singletonList(EnodeURL.fromString(enodeDns, enodeDnsConfiguration))); controller = new NodeLocalConfigPermissioningController( permissioningConfig, bootnodesList, selfEnode.getNodeId(), metricsSystem); assertThat(controller.getNodesAllowlist()).hasSize(1); assertThat(controller.getNodesAllowlist()) .contains( "enode: }
@Test @SuppressWarnings("unchecked") public void getNodeAllowlistShouldWorkWhenDnsAndUpdateEnabled() throws Exception { final Path permissionsFile = createPermissionsFileWithNode(enodeDns); final LocalPermissioningConfiguration permissioningConfig = mock(LocalPermissioningConfiguration.class); final EnodeDnsConfiguration enodeDnsConfiguration = ImmutableEnodeDnsConfiguration.builder().dnsEnabled(true).updateEnabled(true).build(); when(permissioningConfig.getNodePermissioningConfigFilePath()) .thenReturn(permissionsFile.toAbsolutePath().toString()); when(permissioningConfig.isNodeAllowlistEnabled()).thenReturn(true); when(permissioningConfig.getNodeAllowlist()) .thenReturn(singletonList(EnodeURL.fromString(enodeDns, enodeDnsConfiguration))); controller = new NodeLocalConfigPermissioningController( permissioningConfig, bootnodesList, selfEnode.getNodeId(), metricsSystem); assertThat(controller.getNodesAllowlist()).hasSize(1); assertThat(controller.getNodesAllowlist()).contains(enodeDns); }