@Test
public void getConnector() {

    Mockito.when(provider.find(Mockito.any(Connector.ID.class))).thenReturn(Optional.of(connector));
    Mockito.when(connectorId.toString()).thenReturn("C1");
    final Response response = controller.getConnector("C1", true);
    assertThat(response.getEntity())
        .isNotNull()
        .extracting("id").contains("C1");
}