public LogChannelFileWriterBuffer getLogChannelFileWriterBuffer( String id ) {
    synchronized ( syncObject ) {
      LogChannelFileWriterBuffer fileWriterBuffer = this.fileWriterBuffers.get( id );
      if ( fileWriterBuffer != null ) {
        return fileWriterBuffer;
      }

      ConcurrentHashMap<LogChannelFileWriterBuffer, List<String>> possibleWriters = new ConcurrentHashMap<>();

      for ( Map.Entry<String, LogChannelFileWriterBuffer> entry : this.fileWriterBuffers.entrySet() ) {
        final String bufferId = entry.getKey();
        List<String> logChannelChildren = getLogChannelChildren( bufferId );
        if ( logChannelChildren.contains( id ) ) {
          possibleWriters.put( entry.getValue(), logChannelChildren );
        }
      }

      return determineLogChannelFileWriterBuffer( possibleWriters );
    }
  }
@Test
  public void getLogChannelFileWriterBufferTest() {
    LoggingRegistry loggingRegistry = LoggingRegistry.getInstance();
    Map<String, LogChannelFileWriterBuffer> fileWriterBuffers = getDummyFileWriterBuffers();

    loggingRegistry.setFileWriterBuffers( fileWriterBuffers );
    loggingRegistry.setChildrenMap( getDummyChildrenMap() );

    assertEquals( "dc8c1482-30ab-4d0f-b9f6-e4c32a627bf0", loggingRegistry.getLogChannelFileWriterBuffer( "dcffc35f-c74f-4e37-b463-97313998ea20" ).getLogChannelId() );

    //Switch the order of the writers
    fileWriterBuffers.remove( "7c1526bc-789e-4f5a-8d68-1f9c39488ceb" );
    fileWriterBuffers.put( "7c1526bc-789e-4f5a-8d68-1f9c39488ceb", new LogChannelFileWriterBuffer( "7c1526bc-789e-4f5a-8d68-1f9c39488ceb" ) );
    loggingRegistry.setFileWriterBuffers( fileWriterBuffers );

    //regardless of the order of the writers the correct the same should be selected
    assertEquals( "dc8c1482-30ab-4d0f-b9f6-e4c32a627bf0", loggingRegistry.getLogChannelFileWriterBuffer( "dcffc35f-c74f-4e37-b463-97313998ea20" ).getLogChannelId() );
  }