public static NettySourceConfig load(Map<String, Object> map) throws IOException {
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(mapper.writeValueAsString(map), NettySourceConfig.class);
    }
@Test
    public void testNettyTcpConfigLoadWithYamlFile() throws IOException {
        File yamlFile = getFile("nettySourceConfig.yaml");
        NettySourceConfig nettySourceConfig = NettySourceConfig.load(yamlFile.getAbsolutePath());
        assertNotNull(nettySourceConfig);
        assertEquals(TCP, nettySourceConfig.getType());
        assertEquals(LOCALHOST, nettySourceConfig.getHost());
        assertEquals(10911, nettySourceConfig.getPort());
        assertEquals(5, nettySourceConfig.getNumberOfThreads());
    }