@Test
public void testUploadConfigError() throws ExecutionException, InterruptedException, NetconfMessageBuilderException {

    m_newDevice.getDeviceManagement().setPushPmaConfigurationToDevice("false");
    Future<NetConfResponse> responseFuture = mock(Future.class);
    NetConfResponse netConfResponse = null;
    try {
        netConfResponse = DocumentToPojoTransformer.getNetconfResponse(DocumentUtils.stringToDocument(SAMPLE_NON_EMPTY_NC_RES));
    } catch (NetconfMessageBuilderException e) {
        throw new RuntimeException(e);
    }
    when(responseFuture.get()).thenReturn(netConfResponse);
    when(m_devInterface.getConfig(eq(m_newDevice), anyObject())).thenReturn(responseFuture);
    Map<NetConfResponse, List<Notification>> map = new HashMap<>();
    NetConfResponse netConfRespons = DocumentToPojoTransformer.getNetconfResponse(DocumentUtils.stringToDocument(ERROR_RESPONSE));
    map.put(netConfRespons, Collections.emptyList());
    when(m_pmaSession.executeNC(EDIT_CONFIG_REQ)).thenReturn(map);
    m_timer.runAlignment();
    assertEquals("false", m_newDevice.getDeviceManagement().getPushPmaConfigurationToDevice());
    verify(m_deviceDao, never()).updateDeviceAlignmentState(anyString(), anyString());
    assertTrue(m_newDevice.isNeverAligned());
}