@Test
public void createsObjectNameWithDomainInInput() {

    DefaultObjectNameFactory f = new DefaultObjectNameFactory();
    ObjectName on = f.createName("type", "com.domain", "something.with.dots");
    assertThat(on.getDomain()).isEqualTo("com.domain");
}