@Test(description = "Testing getting device information when unable to retrieve information")
public void testGetDeviceInformationException() throws DeviceDetailsMgtException {

    DeviceInformationManager deviceInformationManager = Mockito
            .mock(DeviceInformationManagerImpl.class, Mockito.RETURNS_MOCKS);
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceInformationManagerService")).
            toReturn(deviceInformationManager);
    Mockito.when(deviceInformationManager.getDeviceInfo(Mockito.any(DeviceIdentifier.class)))
            .thenThrow(new DeviceDetailsMgtException());
    Response response = this.deviceManagementService
            .getDeviceInformation(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), null);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
}