class EC2RaiderImpl implements EC2Raider {

    @Override
    public EC2InstanceTO getEC2InstanceById(String instanceId) {

        if (instanceId.isEmpty() || instanceId == null) {
            throw new InvalidInputDataException("Empty/Null instanceId provided in request");
        }

        EC2InstanceTO ec2InstanceTO = null;
        for (Reservation res : ec2Delegator.getEc2().describeInstances().getReservations()) {
            for (Instance i : res.getInstances()) {
                if (i.getInstanceId().equalsIgnoreCase(instanceId) && i.getState().getName().equalsIgnoreCase("running")) {
                    ec2InstanceTO = this.createEc2Instance(i);
                    break;
                }
            }
        }

        if (ec2InstanceTO == null) {
            throw new ResourceNotFoundException("Unable to find EC2 Instances with given instance id: " + instanceId);
        }
        return ec2InstanceTO;
    }

    public  EC2RaiderImpl();

}