### Question:
MBeanSelector { MBeanSelector merge(MBeanSelector selector) { return new MBeanSelector(this, selector); } private  MBeanSelector(Map<String, Object> map); private  MBeanSelector(MBeanSelector first, MBeanSelector second); static MBeanSelector create(Map<String, Object> map); String getPrintableRequest(); String getRequest(); String getUrl(Protocol protocol, String host, int port); QueryType getQueryType();  }### Answer:
@Test public void whenMergingLeafElements_combineValues() { MBeanSelector selector1 = createLeaf("first", "second"); MBeanSelector selector2 = createLeaf("second", "third"); assertThat(querySpec(selector1.merge(selector2)), hasJsonPath("$.fields").withValues("first", "second", "third")); }