@Test(description = "Testing get devices when request exists both name and role.")
public void testGetDevicesWhenBothNameAndRoleAvailable() {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceAccessAuthorizationService"))
            .toReturn(this.deviceAccessAuthorizationService);
    Response response = this.deviceManagementService
            .getDevices(TEST_DEVICE_NAME, TEST_DEVICE_TYPE, DEFAULT_USERNAME, null, DEFAULT_ROLE, DEFAULT_OWNERSHIP,
                    DEFAULT_STATUS, 1, null, null, 10, 5);
    Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
}