@Test
public void shouldCreateTheCorrectObjectNameForTheSystemCommanderMBean() throws Exception {

    final String contextName = "people";
    final ObjectName objectName = mock(ObjectName.class);
    when(objectNameFactory.create(
            "uk.gov.justice.services.framework.management",
            "type",
            "people-system-command-handler-mbean")).thenReturn(objectName);
    assertThat(commandMBeanNameProvider.create(contextName), is(objectName));
}