class FactorServiceImpl implements FactorService {

    @Override
    public void deleteFactor(String factorId, OktaUser user) throws OktaException
    {
        Preconditions.checkArgument(!StringUtils.isEmpty(factorId), "factorId is null or empty");

        if (user != null)
        {
            String apiPath = String.format(OktaAPIConstants.GET_FACTOR, user.getId(), factorId);
            ResponseEntity<Factor> exchange = oktaRestService.doRestCall(apiPath, HttpMethod.DELETE, Factor.class, "parameters");
            if (!exchange.getStatusCode().is2xxSuccessful())
            {
                throw new OktaException(buildErrorMessage(exchange.getBody()));
            }
        }
    }

}