@Test
public void mergeShouldReturnNewInstanceWithMergedMap() throws Exception {

    Map map = mock(Map.class);
    Map mergedMap = mock(Map.class);
    DefaultCRestConfig expected = mock(DefaultCRestConfig.class);
    mockStatic(Maps.class);
    when(Maps.merge(config, map)).thenReturn(mergedMap);
    whenNew(DefaultCRestConfig.class).withArguments(mergedMap).thenReturn(expected);
    
    assertSame(expected, toTest.merge(map));
}