public static <E extends CoreAttrs> E setSelector(E e, String selector) {
    String[] res = parseSelector(selector);
    if (res[S_ID] != null) {
      e.$id(res[S_ID]);
    }
    if (res[S_CLASS] != null) {
      e.$class(res[S_CLASS]);
    }
    return e;
  }
@Test
  void testSetSelector() {
    CoreAttrs e = mock(CoreAttrs.class);
    HamletImpl.setSelector(e, "#id.class");

    verify(e).$id("id");
    verify(e).$class("class");

    H1 t = mock(H1.class);
    HamletImpl.setSelector(t, "#id.class").__("heading");

    verify(t).$id("id");
    verify(t).$class("class");
    verify(t).__("heading");
  }