@Test
public void testExecuteWithPmaSessionException() throws ExecutionException {

    when(m_adapterManager.getAdapterContext(any())).thenReturn(null);
    try {
        m_pmaRegistry.executeWithPmaSession("device1", session -> "response");
    } catch (RuntimeException e) {
        assertEquals("Could not get session to Pma device1", e.getMessage());
    }
}