Mark Kilkeary, Kimberly, Danielle and the rest of the team we're spectacular, sharp and quick. Despite the few and far in between bumps along the process, the end result was far better than previous experiences that we've had with other lenders. Should we need other loan products, we won't hesitate to choose this team again. And have and will continue to recommend them to friends and family!
Mark was very attentive and quick to respond to any questions we had. Things move fast in our region, and he was able to get the information necessary for our offer together in a timely manner under tight deadlines. Finally, all charges and fees were explained up front, and we were not hit with any surprises.
Mark Kilkeary has worked in the mortgage industry for over 14 years. As a native of northern Virginia and father of two children, Mark has a wealth of knowledge with the local market and home financing trends. He is dedicated to providing his clients with reliable and prompt service which is evident from the fact that his clients are 100% referral based.
Throughout his career, Mark has used his strong work ethic to his advantage and is dedicated to his role as a Senior Loan Officer with Guaranteed Rate. He is able to offer a large library of loan programs at competitive pricing as well as in-house processing, underwriting and closing. All of these elements of the financing process enable Mark to provide his clients with a smooth lending experience. He is proficient with purchase and refinancing and specializes in Veterans Affairs (VA) home loans.
I wouldn't say any customer is typical. They all have their own unique situation. It is important for me to understand their situation as much as possible and help direct them to the options that are best for them. The most typical question is about what costs are involved and my goal is to set their expectation as accurately as possible.
I like to ask engaging questions that allow the customers to go into their preferences and goals. Based on past experience, that allows me to recommend options that may be best for their specific situation.
Providing a process that meets the expectation I have set from the beginning with the customer. Secondly, seeing a happy face on the customer at closing.


P.Karthik, D.Gokul Prashanth, T.Gokul, "Chaotic Secure Communication Using Iterated Filtering Method", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.1-5.
M.Arumugaraja, K.P.Aravinda Kumar, V.Karthick, "Classroom Observation System", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.6-8.
R.Jamuna, S.Abhinai, S.P.Jhananadhan , "Handicapped Assistance Device for Controlling Electrical Appliances", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.9-12.
R.Jamuna, K.Bharath Kumar, P.Karthikeyan , "Wheelchair Control Using Voice Recognition", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.13-16.
M.Priscilla, B.Nandhini, S.Manju, S.Shafiqa Shalaysha , "Reconstruction of Objects with VSN", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.17-20.
Dhileep Shyl.S, "Automatic Management of Environmental Parameters Inside The Greenhouse Using Wireless Sensor Network", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.21-24.
Ramkumar.V, "Automated Object Detection and Suspicious Behaviour Alert In ATM Using Embedded System", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.25-29.
Chithra.P.S, Jenifer Darling Rosita.P, "Multiple Hazard Detection in Mine Using Embedded System", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.30-35.
Selvi.K, Rajeswari.S, "An Equipped Sensorized Glove with Bent Sensor for Measuring Finger Flexion", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.36-41.
Anisha Jose, Anu K Kuriakose, "An Efficient Code-word Substitution Method for Data Embedding Technique in Encrypted H.264/AVC Video Streams", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.42-46.
Nisha Menon.K, Minu Kuriakose, "A Novel Visual Cryptographic Scheme Using Floyd Steinberg Half Toning and Block Replacement Algorithms", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.47-51.
Vedhapriya Vadhana.R, Maheswari.E, "Parametric Blur Estimation Using Modified Radon Transform for Natural Images Restoration", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.52-56.
R.Ravi, Dr.Beulah Shekhar, "SQL Vulnerability Prevention in Cybercrime using Dynamic Evaluation of Shell and Remote File Injection Attacks", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.57-64.
R.Ravi, Dr.Beulah Shekhar, "Prevention of Cybercrime by Suspicious URL Detection in Social Networks Using Enhanced DBSCAN Algorithm", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.65-71.
M.Madhivhanan, "The Performance Tuning of Seven Level Diode Clamped Multi Level Inverter", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.72-79.
R.Tino Merlin, "MULTI-CONSTRAINED OPTIMAL PATH SELECTION BASED ON APPROXIMATION ALGORITHMS", International Journal Of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST), VOLUME 1,ISSUE 1 - APRIL 2015, pp.80-86.


text:
LEADING THE WAY: CHRIS MILLETTE
Chris Millette, who has been bowling only three years, struck for his first 300 game and highest series, 785, in the Thursday Goldrush League at Classic Lanes on Jan. 13. Millette, 20, opened with the perfect game, then added games of 237 and 238. He went into the night with a 208 average. Millette, a 2002 Warwick High School graduate, also had his previous bowling highs at Classic: a 279 game and 767 series last year.
* To nominate someone for Leading the way, please e-mail erichards@dailypress.com, with a head shot if possible. *

redpajama_set_name: RedPajamaCommonCrawl


text:
package com.hazelcast.client.impl.protocol.codec;

import com.hazelcast.client.impl.protocol.ClientMessage;
import com.hazelcast.client.impl.protocol.Generated;
import com.hazelcast.client.impl.protocol.codec.builtin.*;
import com.hazelcast.client.impl.protocol.codec.custom.*;

import javax.annotation.Nullable;

import static com.hazelcast.client.impl.protocol.ClientMessage.*;
import static com.hazelcast.client.impl.protocol.codec.builtin.FixedSizeTypesCodec.*;

/*
 * This file is auto-generated by the Hazelcast Client Protocol Code Generator.
 * To change this file, edit the templates or the protocol
 * definitions on the https://github.com/hazelcast/hazelcast-client-protocol
 * and regenerate it.
 */

/**
 * Copies all of the mappings from the specified map to this MultiMap. The effect of this call is
 * equivalent to that of calling put(k, v) on this MultiMap iteratively for each value in the mapping from key k to value
 * v in the specified MultiMap. The behavior of this operation is undefined if the specified map is modified while the
 * operation is in progress.
 */
@Generated("90a78f8f4cbb0ba1ef1c68323071b018")
public final class MultiMapPutAllCodec {
    //hex: 0x021700
    public static final int REQUEST_MESSAGE_TYPE = 136960;
    //hex: 0x021701
    public static final int RESPONSE_MESSAGE_TYPE = 136961;
    private static final int REQUEST_INITIAL_FRAME_SIZE = PARTITION_ID_FIELD_OFFSET + INT_SIZE_IN_BYTES;
    private static final int RESPONSE_INITIAL_FRAME_SIZE = RESPONSE_BACKUP_ACKS_FIELD_OFFSET + BYTE_SIZE_IN_BYTES;

    private MultiMapPutAllCodec() {
    }

    @edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
    public static class RequestParameters {

        /**
         * name of map
         */
        public java.lang.String name;

        /**
         * mappings to be stored in this map
         */
        public java.util.List<java.util.Map.Entry<com.hazelcast.internal.serialization.Data, java.util.List<com.hazelcast.internal.serialization.Data>>> entries;
    }

    public static ClientMessage encodeRequest(java.lang.String name, java.util.Collection<java.util.Map.Entry<com.hazelcast.internal.serialization.Data, java.util.Collection<com.hazelcast.internal.serialization.Data>>> entries) {
        ClientMessage clientMessage = ClientMessage.createForEncode();
        clientMessage.setRetryable(false);
        clientMessage.setOperationName("MultiMap.PutAll");
        ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);
        encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);
        encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);
        clientMessage.add(initialFrame);
        StringCodec.encode(clientMessage, name);
        EntryListCodec.encode(clientMessage, entries, DataCodec::encode, ListDataCodec::encode);
        return clientMessage;
    }

    public static MultiMapPutAllCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {
        ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();
        RequestParameters request = new RequestParameters();
        //empty initial frame
        iterator.next();
        request.name = StringCodec.decode(iterator);
        request.entries = EntryListCodec.decode(iterator, DataCodec::decode, ListDataCodec::decode);
        return request;
    }

    public static ClientMessage encodeResponse() {
        ClientMessage clientMessage = ClientMessage.createForEncode();
        ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[RESPONSE_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);
        encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, RESPONSE_MESSAGE_TYPE);
        clientMessage.add(initialFrame);

        return clientMessage;
    }

}

redpajama_set_name: RedPajamaGithub


text:
Now reading: Why does NAD+ decline with age?
Why does NAD+ decline with age?
We know that NAD+ levels in our body naturally decline as we age. By age 40, levels of NAD+ have declined by 50% and this increases to 80% by age 60. NAD+ is intrinsically linked to the ageing process and our cellular health. But why do our NAD+ levels decline like this as we age?
NAD+ declines with age because it is destroyed
Research has shown that over time, NAD+ is actively destroyed by the enzyme CD38. CD38 is a membrane-bound NADase that hydrolyzes NAD+ to nicotinamide and (cyclic-)ADP-ribose. It's associated with immune responses and energy metabolism, but it's also a NADase whose levels rise with ageing, with a corresponding increase in NADase activity and a decrease of NAD+. Put plainly, CD38 requires NAD+ to function and while active, it binds and consumes specific parts of the molecule.
The mechanisms of ageing also contribute to NAD+ decline
Additionally, the common mechanisms of ageing, including oxidative stress, decline in mitochondria production and gene expression, DNA function, and healthy inflammation responses, all lead to NAD+ decline.
Salvage pathway vs. de novo pathway
To produce NAD+, two main pathways are involved. The first is called the de novo pathway, which uses the essential amino acid L-tryptophan. De novo pathways require precursors that can only be obtained from the diet. The second is called the salvage pathway, which uses the molecules NA, NAM, NMN and NR. The main source of NAD+ production is this salvage pathway but unfortunately, this pathway appears to be disrupted with age, possibly due to a reduction in NAMPT, an enzyme that inhibits the salvage pathway.
Consequences of low NAD+
Because NAD+ is so intrinsic to a variety of vital internal functions on a cellular level. The consequences of low NAD+ levels can be quite far reaching and can include:
Premature ageing
Immune system issues
Increased stress and anxiety
Excess fatigue
Brain fog and lack of mental clarity
Low concentration levels
These can impact your day-to-day life and can leave you struggling to live a happy and fulfilled life as you get older. NAD+ levels can also determine the severity of the symptoms of some brain-destroying diseases such as Alzheimer's and Parkinson's and can impact how people deal and cope with addiction issues relating to food, drugs, cigarettes and alcohol.
NAD+ supplementation
It's clear then that to maintain adequate levels of NAD+ as we age, continued NAD+ supplement is vital. The most cost-effective and efficient way to introduce more NAD+ to your body is by taking pure NAD+ supplements. Our Optima Max 100 supplement has been formulated by our research & development team, based on the same formulation as NADclinic's pioneering NAD+ IV protocol. This supplement is made from 100% NAD+, the highest purity and potency of all non-prescription NAD+ supplements available. Simply take two tablets every morning, with or without food, to see the benefits of Optima Max and increase your NAD+ levels.
Written by melanie smith
Who can benefit from NAD+ supplements?
What are NMN & NR?


text:
package com.gdn.x.beirut.clientsdk;

import static org.mockito.MockitoAnnotations.initMocks;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.springframework.http.MediaType;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.web.multipart.MultipartFile;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gdn.client_sdk.shade.org.apache.http.HttpEntity;
import com.gdn.client_sdk.shade.org.apache.http.StatusLine;
import com.gdn.client_sdk.shade.org.apache.http.client.config.RequestConfig;
import com.gdn.client_sdk.shade.org.apache.http.client.methods.CloseableHttpResponse;
import com.gdn.client_sdk.shade.org.apache.http.client.methods.HttpPost;
import com.gdn.client_sdk.shade.org.apache.http.client.methods.HttpRequestBase;
import com.gdn.client_sdk.shade.org.apache.http.entity.ByteArrayEntity;
import com.gdn.client_sdk.shade.org.apache.http.impl.client.CloseableHttpClient;
import com.gdn.common.client.GdnRestClientConfiguration;
import com.gdn.common.util.GdnHttpClientHelper;
import com.gdn.common.web.param.MandatoryRequestParam;
import com.gdn.common.web.wrapper.response.GdnBaseRestResponse;
import com.gdn.common.web.wrapper.response.GdnRestListResponse;
import com.gdn.common.web.wrapper.response.GdnRestSingleResponse;
import com.gdn.x.beirut.dto.request.ApplyNewPositionModelDTORequest;
import com.gdn.x.beirut.dto.request.ListStringRequest;
import com.gdn.x.beirut.dto.request.PositionDTORequest;
import com.gdn.x.beirut.dto.request.UpdateCandidateStatusModelDTORequest;
import com.gdn.x.beirut.dto.response.CandidateDTOResponseWithoutDetail;
import com.gdn.x.beirut.dto.response.CandidatePositionDTOResponse;
import com.gdn.x.beirut.dto.response.CandidatePositionSolrDTOResponse;
import com.gdn.x.beirut.dto.response.PositionDTOResponse;
import com.gdn.x.beirut.dto.response.PositionDetailDTOResponse;

public class BeirutApiClientTest {

  private static final String REQUEST_ID = "REQUEST_ID";
  private static final String USERNAME = "USERNAME";
  private static final String CLIENT_ID = "CLIENT_ID";
  private static final String CHANNEL_ID = "CHANNEL_ID";
  private static final String STORE_ID = "STORE_ID";
  private static final String HOST = "localhost";
  private static final String PASSWORD = "password";
  private static final String CONTEXT_PATH = "beirut/docs/api";
  private static final String CONTEXT_PATH_TEST = "/beirut/docs/api";
  private static final String ID_CANDIDATE = "id_candidate";
  private static final String ID_POSITION = "id_position";
  private static final String QUERY = "query";
  private static final String JSON = MediaType.APPLICATION_JSON_VALUE;
  private static final Integer PORT = 8080;
  private static final int PAGE = 0;
  private static final int SIZE = 5;
  private static final int CONNECTION_TIMEOUT_IN_MS = 6000;
  private static final String ID = "ID";
  private static final Boolean MARK_FOR_DELETE = false;
  private static final String TITLE = "TITLE";
  private static final String FILENAME = "applyNewPositionRequest.json";

  private MandatoryRequestParam mandatoryRequestParam;
  private GdnBaseRestResponse gdnBaseResponse;
  private PositionDTORequest positionDTORequest;
  private MultipartFile file;
  private TypeReference<GdnBaseRestResponse> typeRef;

  private GdnRestListResponse<CandidatePositionSolrDTOResponse> gdnRestListCandidatePositionSolrDTOResponse;
  private GdnRestSingleResponse<CandidatePositionDTOResponse> gdnRestSingleCandidatePositionDTOResponse;
  private GdnRestListResponse<PositionDTOResponse> gdnRestListPositionDTOResponse;
  private GdnRestListResponse<CandidateDTOResponseWithoutDetail> gdnRestListCandidateDTOResponseWithoutDetail;
  private GdnRestListResponse<PositionDetailDTOResponse> gdnRestListPositionDetailDTOResponse;

  private HashMap<String, String> additionalRequestParam;
  private final ListStringRequest listPositionIdString = new ListStringRequest();
  private String candidateDTORequestString;
  private String positionDTORequestString;
  private final Long start = new Long(0);
  private final Long end = new Long(99999999);

  private ObjectMapper objectMapper;

  @Mock
  private GdnHttpClientHelper httpClientHelper;

  @Mock
  private GdnRestClientConfiguration clientConfig;

  @InjectMocks
  private BeirutApiClient beirutApiClient;

  @SuppressWarnings("deprecation")
  @Before
  public void initialize() throws Exception {
    initMocks(this);
    candidateDTORequestString = FileUtils
        .readFileToString(new File("src/test/resources/JSON/candidateDTORequestString.txt"));
    positionDTORequestString = FileUtils
        .readFileToString(new File("src/test/resources/JSON/positionDTORequestString.txt"));
    this.gdnBaseResponse = new GdnBaseRestResponse(REQUEST_ID);
    List<String> list = new ArrayList<String>();
    list.add("ad");
    this.listPositionIdString.setValues(list);
    Path path = Paths.get("src/test/resources/JSON/applyNewPositionRequest.json");
    String name = "applyNewPositionRequest.json";
    String originalFileName = "applyNewPositionRequest.json";
    String contentType = MediaType.APPLICATION_JSON_VALUE;
    byte[] content = null;
    try {
      content = Files.readAllBytes(path);
    } catch (final IOException e) {
    }
    this.file = new MockMultipartFile(name, originalFileName, contentType, content);
    this.gdnRestSingleCandidatePositionDTOResponse =
        new GdnRestSingleResponse<CandidatePositionDTOResponse>();
    this.gdnRestListCandidatePositionSolrDTOResponse =
        new GdnRestListResponse<CandidatePositionSolrDTOResponse>();
    this.gdnRestListPositionDTOResponse = new GdnRestListResponse<PositionDTOResponse>();
    this.gdnRestListCandidateDTOResponseWithoutDetail =
        new GdnRestListResponse<CandidateDTOResponseWithoutDetail>();
    this.gdnRestListPositionDetailDTOResponse =
        new GdnRestListResponse<PositionDetailDTOResponse>();

    this.clientConfig = new GdnRestClientConfiguration(USERNAME, PASSWORD, HOST, PORT, CLIENT_ID,
        CHANNEL_ID, STORE_ID);
    this.clientConfig.setConnectionTimeoutInMs(CONNECTION_TIMEOUT_IN_MS);
    this.beirutApiClient = new BeirutApiClient(this.clientConfig, CONTEXT_PATH);
    this.mandatoryRequestParam = MandatoryRequestParam.generateMandatoryRequestParam(STORE_ID,
        CHANNEL_ID, CLIENT_ID, REQUEST_ID, USERNAME, USERNAME);
    typeRef = new TypeReference<GdnBaseRestResponse>() {};
    this.beirutApiClient.setTypeRef(typeRef);
    ReflectionTestUtils.setField(beirutApiClient, "httpClientHelper", httpClientHelper,
        GdnHttpClientHelper.class);
    objectMapper = new ObjectMapper();
    this.beirutApiClient.setObjectMapper(objectMapper);

  }

  @After
  public void noMoreTransaction() {}

  @Test
  public void testApplyNewPosition() throws Exception {
    objectMapper = new ObjectMapper();
    @SuppressWarnings("deprecation")
    String applyNewPositionModelStringJson = FileUtils
        .readFileToString(new File("src/test/resources/JSON/applyNewPositionRequest.json"));
    ApplyNewPositionModelDTORequest applyNewPositionModelDTORequest = objectMapper
        .readValue(applyNewPositionModelStringJson, ApplyNewPositionModelDTORequest.class);
    URI uriApplyNewPosition = new URI("/candidate/applyNewPosition");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.APPLY_NEW_POSITION, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriApplyNewPosition);

    Mockito.when(
        this.httpClientHelper.invokePostType(uriApplyNewPosition, applyNewPositionModelDTORequest,
            ApplyNewPositionModelDTORequest.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS))
        .thenReturn(this.gdnBaseResponse);

    GdnBaseRestResponse response = this.beirutApiClient.applyNewPosition(REQUEST_ID, USERNAME,
        applyNewPositionModelDTORequest);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.APPLY_NEW_POSITION, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokePostType(uriApplyNewPosition,
        applyNewPositionModelDTORequest, ApplyNewPositionModelDTORequest.class, typeRef, JSON,
        CONNECTION_TIMEOUT_IN_MS);
    Assert.assertNotNull(gdnBaseResponse);
    Assert.assertEquals(gdnBaseResponse, response);
  }

  @Test
  public void testDeleteCandidate() throws Exception {
    URI uriDeleteCandidate = new URI("/candidate/deleteCandidate");
    Mockito.when(
        this.httpClientHelper.getURI(HOST, PORT, CONTEXT_PATH_TEST + BeirutApiPath.DELETE_CANDIDATE,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriDeleteCandidate);
    Mockito
        .when(this.httpClientHelper.invokePostType(uriDeleteCandidate, this.listPositionIdString,
            ListStringRequest.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS))
        .thenReturn(this.gdnBaseResponse);

    GdnBaseRestResponse response =
        this.beirutApiClient.deleteCandidate(REQUEST_ID, USERNAME, listPositionIdString);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.DELETE_CANDIDATE, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokePostType(uriDeleteCandidate,
        this.listPositionIdString, ListStringRequest.class, typeRef, JSON,
        CONNECTION_TIMEOUT_IN_MS);
    Assert.assertNotNull(gdnBaseResponse);
    Assert.assertEquals(gdnBaseResponse, response);
  }

  @Test
  public void testDeletePosition() throws Exception {
    URI uriDeletePosition = new URI("/position/deletePosition");
    Mockito.when(
        this.httpClientHelper.getURI(HOST, PORT, CONTEXT_PATH_TEST + BeirutApiPath.DELETE_POSITION,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriDeletePosition);
    Mockito
        .when(this.httpClientHelper.invokePostType(uriDeletePosition, this.listPositionIdString,
            ListStringRequest.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS))
        .thenReturn(this.gdnBaseResponse);

    GdnBaseRestResponse response =
        this.beirutApiClient.deletePosition(REQUEST_ID, USERNAME, listPositionIdString);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.DELETE_POSITION, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokePostType(uriDeletePosition,
        this.listPositionIdString, ListStringRequest.class, typeRef, JSON,
        CONNECTION_TIMEOUT_IN_MS);
    Assert.assertNotNull(gdnBaseResponse);
    Assert.assertEquals(gdnBaseResponse, response);
  }

  @Test
  public void testFindCandidateByCreatedDateBetweenAndStoreId() throws Exception {
    // TODO pake start sama end yang ada di attribut
  }

  @Test
  public void testGetAllCandidateByStoreIdAndMarkForDeleteWithPageable() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("markForDelete", String.valueOf(MARK_FOR_DELETE));
    this.additionalRequestParam.put("page", String.valueOf(PAGE));
    this.additionalRequestParam.put("size", String.valueOf(SIZE));
    URI uriGetAllCandidateByStoreIdAndMarkForDeleteWithPageable =
        new URI("/candidate/getAllCandidatesByStoreIdWithPageable");
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST
                + BeirutApiPath.GET_ALL_CANDIDATE_BY_STOREID_AND_MARK_FOR_DELETE_WITH_PAGEABLE,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetAllCandidateByStoreIdAndMarkForDeleteWithPageable);
    Mockito
        .when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
            Mockito.eq(CandidateDTOResponseWithoutDetail.class),
            Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class)))
        .thenReturn(gdnRestListCandidateDTOResponseWithoutDetail);

    GdnRestListResponse<CandidateDTOResponseWithoutDetail> response =
        this.beirutApiClient.getAllCandidateByStoreIdAndMarkForDeleteWithPageable(REQUEST_ID,
            USERNAME, MARK_FOR_DELETE, PAGE, SIZE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST
            + BeirutApiPath.GET_ALL_CANDIDATE_BY_STOREID_AND_MARK_FOR_DELETE_WITH_PAGEABLE,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(CandidateDTOResponseWithoutDetail.class),
        Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListCandidateDTOResponseWithoutDetail);
    Assert.assertEquals(gdnRestListCandidateDTOResponseWithoutDetail, response);
  }

  @Test
  public void testGetAllCandidateByStoreIdWithPageable() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("page", String.valueOf(PAGE));
    this.additionalRequestParam.put("size", String.valueOf(SIZE));
    URI uriGetAllCandidateByStoreIdWithPageable =
        new URI("/candidate/getAllCandidatesByStoreIdWithPageable");
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_CANDIDATE_BY_STORE_ID_WITH_PAGEABLE,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetAllCandidateByStoreIdWithPageable);
    Mockito
        .when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
            Mockito.eq(CandidateDTOResponseWithoutDetail.class),
            Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class)))
        .thenReturn(gdnRestListCandidateDTOResponseWithoutDetail);

    GdnRestListResponse<CandidateDTOResponseWithoutDetail> response =
        this.beirutApiClient.getAllCandidateByStoreIdWithPageable(REQUEST_ID, USERNAME, PAGE, SIZE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_CANDIDATE_BY_STORE_ID_WITH_PAGEABLE,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(CandidateDTOResponseWithoutDetail.class),
        Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListCandidateDTOResponseWithoutDetail);
    Assert.assertEquals(gdnRestListCandidateDTOResponseWithoutDetail, response);
  }

  @Test
  public void testGetAllPositionByStoreId() throws Exception {
    URI uriGetAllPositionByStoreId = new URI("/position/getAllPosition");
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_POSITION_BY_STOREID,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetAllPositionByStoreId);
    Mockito.when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class))).thenReturn(gdnRestListPositionDTOResponse);

    GdnRestListResponse<PositionDTOResponse> response =
        this.beirutApiClient.getAllPositionByStoreId(REQUEST_ID, USERNAME);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_POSITION_BY_STOREID, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListPositionDTOResponse);
    Assert.assertEquals(gdnRestListPositionDTOResponse, response);
  }

  @Test
  public void testGetAllPositionWithPageable() throws Exception {
    URI uriGetAllPositionWithPageable = new URI("/position/getAllPositionWithPageable");
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("page", String.valueOf(PAGE));
    this.additionalRequestParam.put("size", String.valueOf(SIZE));
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_POSITION_WITH_PAGEABLE,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetAllPositionWithPageable);
    Mockito.when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class))).thenReturn(gdnRestListPositionDTOResponse);

    GdnRestListResponse<PositionDTOResponse> response =
        this.beirutApiClient.getAllPositionWithPageable(REQUEST_ID, USERNAME, PAGE, SIZE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_ALL_POSITION_WITH_PAGEABLE,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListPositionDTOResponse);
    Assert.assertEquals(gdnRestListPositionDTOResponse, response);
  }

  @Test
  public void testGetCandidatePositionBySolrQuery() throws Exception {
    URI uriGetCandidatePositionBySolrQuery = new URI("/candidate/getCandidatePositionBySolrQuery");
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("query", QUERY);
    this.additionalRequestParam.put("page", String.valueOf(PAGE));
    this.additionalRequestParam.put("size", String.valueOf(SIZE));
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_CANDIDATE_POSITION_BY_SOLR_QUERY,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetCandidatePositionBySolrQuery);
    Mockito
        .when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
            Mockito.eq(CandidatePositionSolrDTOResponse.class),
            Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class)))
        .thenReturn(gdnRestListCandidatePositionSolrDTOResponse);

    GdnRestListResponse<CandidatePositionSolrDTOResponse> response = this.beirutApiClient
        .getCandidatePositionBySolrQuery(REQUEST_ID, USERNAME, QUERY, PAGE, SIZE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_CANDIDATE_POSITION_BY_SOLR_QUERY,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(CandidatePositionSolrDTOResponse.class),
        Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListCandidatePositionSolrDTOResponse);
    Assert.assertEquals(gdnRestListCandidatePositionSolrDTOResponse, response);
  }

  @Test
  public void testGetCandidatePositionDetailByStoreIdWithLogs() throws Exception {
    URI uriGetCandidatePositionDetailByStoreIdWithLogs =
        new URI("/candidate/getCandidatePositionDetailByStoreIdWithLogs");
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("query", QUERY);
    this.additionalRequestParam.put("idCandidate", String.valueOf(ID_CANDIDATE));
    this.additionalRequestParam.put("idPosition", String.valueOf(ID_POSITION));
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_CANDIDATE_POSITION_DETAIL_BY_STOREID_WITH_LOGS,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetCandidatePositionDetailByStoreIdWithLogs);
    Mockito
        .when(this.httpClientHelper.invokeGetSingle(Mockito.any(HttpRequestBase.class),
            Mockito.eq(CandidatePositionDTOResponse.class),
            Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class)))
        .thenReturn(gdnRestSingleCandidatePositionDTOResponse);

    GdnRestSingleResponse<CandidatePositionDTOResponse> response =
        this.beirutApiClient.getCandidatePositionDetailByStoreIdWithLogs(REQUEST_ID, USERNAME,
            QUERY, ID_CANDIDATE, ID_POSITION);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_CANDIDATE_POSITION_DETAIL_BY_STOREID_WITH_LOGS,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSingle(Mockito.any(HttpRequestBase.class),
        Mockito.eq(CandidatePositionDTOResponse.class),
        Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestSingleCandidatePositionDTOResponse);
    Assert.assertEquals(gdnRestSingleCandidatePositionDTOResponse, response);
  }

  @Test
  public void testGetPositionByStoreIdAndMarkForDelete() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("markForDelete", String.valueOf(MARK_FOR_DELETE));
    URI uriGetPositionByStoreIdAndMarkForDelete =
        new URI("/position/getPositionByStoreIdAndMarkForDelete");
    Mockito
        .when(this.httpClientHelper.getURI(HOST, PORT,
            CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_BY_STOREID_AND_MARK_FOR_DELETE,
            this.mandatoryRequestParam, this.additionalRequestParam))
        .thenReturn(uriGetPositionByStoreIdAndMarkForDelete);
    Mockito.when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class))).thenReturn(gdnRestListPositionDTOResponse);

    GdnRestListResponse<PositionDTOResponse> response = this.beirutApiClient
        .getPositionByStoreIdAndMarkForDelete(REQUEST_ID, USERNAME, MARK_FOR_DELETE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_BY_STOREID_AND_MARK_FOR_DELETE,
        this.mandatoryRequestParam, this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListPositionDTOResponse);
    Assert.assertEquals(gdnRestListPositionDTOResponse, response);
  }

  @Test
  public void testGetPositionByTitle() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("title", TITLE);
    URI uriGetPositionByTitle = new URI("/position/getPositionByTitle");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_TITLE, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriGetPositionByTitle);
    Mockito.when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class))).thenReturn(gdnRestListPositionDTOResponse);

    GdnRestListResponse<PositionDTOResponse> response =
        this.beirutApiClient.getPositionByTitle(REQUEST_ID, USERNAME, TITLE);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_TITLE, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListPositionDTOResponse);
    Assert.assertEquals(gdnRestListPositionDTOResponse, response);
  }

  @Test
  public void testGetPositionDetailById() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("id", ID);
    URI uriGetPositionDetailById = new URI("/position/getPositionDetail");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_DETAIL_BY_ID, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriGetPositionDetailById);
    Mockito
        .when(this.httpClientHelper.invokeGetSummary(Mockito.any(HttpRequestBase.class),
            Mockito.eq(PositionDetailDTOResponse.class),
            Mockito.eq(MediaType.APPLICATION_JSON_VALUE), Mockito.any(CloseableHttpClient.class)))
        .thenReturn(gdnRestListPositionDetailDTOResponse);

    GdnRestListResponse<PositionDetailDTOResponse> response =
        this.beirutApiClient.getPositionDetailById(REQUEST_ID, USERNAME, ID);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.GET_POSITION_DETAIL_BY_ID, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokeGetSummary(Mockito.any(HttpRequestBase.class),
        Mockito.eq(PositionDetailDTOResponse.class), Mockito.eq(MediaType.APPLICATION_JSON_VALUE),
        Mockito.any(CloseableHttpClient.class));

    Assert.assertNotNull(gdnRestListPositionDetailDTOResponse);
    Assert.assertEquals(gdnRestListPositionDetailDTOResponse, response);
  }

  @SuppressWarnings("unchecked")
  @Test
  public void testInsertNewCandidate() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("candidateDTORequestString", candidateDTORequestString);
    // Generate URI
    URI uriInsertNewCandidate = new URI("/candidate/insertNewCandidate");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.INSERT_NEW_CANDIDATE, mandatoryRequestParam,
        additionalRequestParam)).thenReturn(uriInsertNewCandidate);
    // Generate HttpPost
    HttpPost httpPost = new HttpPost(uriInsertNewCandidate);
    httpPost.setConfig(RequestConfig.custom().setSocketTimeout(CONNECTION_TIMEOUT_IN_MS)
        .setConnectTimeout(CONNECTION_TIMEOUT_IN_MS).build());
    // Mock createNewHttpPost
    Mockito.when(this.httpClientHelper.createNewHttpPost(Mockito.any(URI.class),
        Mockito.eq(CONNECTION_TIMEOUT_IN_MS))).thenReturn(httpPost);
    // Mock Closeable
    CloseableHttpClient closeableHttpClient = Mockito.mock(CloseableHttpClient.class);
    // Mock getClosable httpConnectionSingleton
    Mockito.when(this.httpClientHelper.getClosableHttpConnectionSingleton())
        .thenReturn(closeableHttpClient);
    // Mock Response
    CloseableHttpResponse closableHttpResponse = Mockito.mock(CloseableHttpResponse.class);
    Mockito.when(closeableHttpClient.execute(httpPost)).thenReturn(closableHttpResponse);
    StatusLine statusLine = Mockito.mock(StatusLine.class);
    Mockito.when(closableHttpResponse.getStatusLine()).thenReturn(statusLine);
    Mockito.when(statusLine.getStatusCode()).thenReturn(200);
    FileInputStream fileMockResponse =
        new FileInputStream(new File("src/test/resources/JSON/fileMockResponse.json"));
    HttpEntity httpEntity = new ByteArrayEntity(IOUtils.toByteArray(fileMockResponse));
    Mockito.when(closableHttpResponse.getEntity()).thenReturn(httpEntity);

    GdnBaseRestResponse response = this.beirutApiClient.insertNewCandidate(REQUEST_ID, USERNAME,
        candidateDTORequestString, this.file.getOriginalFilename(), this.file.getBytes());
    Mockito.verify(this.httpClientHelper, Mockito.times(1)).getURI(Mockito.eq(HOST),
        Mockito.eq(PORT), Mockito.eq(CONTEXT_PATH_TEST + BeirutApiPath.INSERT_NEW_CANDIDATE),
        Mockito.eq(mandatoryRequestParam), Mockito.any(Map.class));
    Mockito.verify(this.httpClientHelper, Mockito.times(1)).getClosableHttpConnectionSingleton();
    Mockito.verify(closeableHttpClient, Mockito.times(1)).execute(httpPost);
    Mockito.verify(closableHttpResponse, Mockito.times(1)).getStatusLine();
    Mockito.verify(statusLine, Mockito.times(1)).getStatusCode();
//    Mockito.verify(closableHttpResponse, Mockito.times(1)).getEntity();
    Assert.assertTrue(response.isSuccess());
  }

  @SuppressWarnings("unchecked")
  @Test
  public void testInsertNewPosition() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("positionDTORequestString", positionDTORequestString);
    // Generate URI
    URI uriInsertNewPosition = new URI("/position/insertNewPosition");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.INSERT_NEW_POSITION, mandatoryRequestParam,
        additionalRequestParam)).thenReturn(uriInsertNewPosition);
    // Generate HttpPost
    HttpPost httpPost = new HttpPost(uriInsertNewPosition);
    httpPost.setConfig(RequestConfig.custom().setSocketTimeout(CONNECTION_TIMEOUT_IN_MS)
        .setConnectTimeout(CONNECTION_TIMEOUT_IN_MS).build());
    // Mock createNewHttpPost
    Mockito.when(this.httpClientHelper.createNewHttpPost(Mockito.any(URI.class),
        Mockito.eq(CONNECTION_TIMEOUT_IN_MS))).thenReturn(httpPost);
    // Mock Closeable
    CloseableHttpClient closeableHttpClient = Mockito.mock(CloseableHttpClient.class);
    // Mock getClosable httpConnectionSingleton
    Mockito.when(this.httpClientHelper.getClosableHttpConnectionSingleton())
        .thenReturn(closeableHttpClient);
    // Mock Response
    CloseableHttpResponse closableHttpResponse = Mockito.mock(CloseableHttpResponse.class);
    Mockito.when(closeableHttpClient.execute(httpPost)).thenReturn(closableHttpResponse);
    StatusLine statusLine = Mockito.mock(StatusLine.class);
    Mockito.when(closableHttpResponse.getStatusLine()).thenReturn(statusLine);
    Mockito.when(statusLine.getStatusCode()).thenReturn(200);
    FileInputStream fileMockResponse =
        new FileInputStream(new File("src/test/resources/JSON/fileMockResponse.json"));
    HttpEntity httpEntity = new ByteArrayEntity(IOUtils.toByteArray(fileMockResponse));
    Mockito.when(closableHttpResponse.getEntity()).thenReturn(httpEntity);

    GdnBaseRestResponse response = this.beirutApiClient.insertNewPosition(REQUEST_ID, USERNAME,
        positionDTORequestString, this.file.getOriginalFilename(), this.file.getBytes());
    Mockito.verify(this.httpClientHelper, Mockito.times(1)).getURI(Mockito.eq(HOST),
        Mockito.eq(PORT), Mockito.eq(CONTEXT_PATH_TEST + BeirutApiPath.INSERT_NEW_POSITION),
        Mockito.eq(mandatoryRequestParam), Mockito.any(Map.class));
    Mockito.verify(this.httpClientHelper, Mockito.times(1)).getClosableHttpConnectionSingleton();
    Mockito.verify(closeableHttpClient, Mockito.times(1)).execute(httpPost);
    Mockito.verify(closableHttpResponse, Mockito.times(1)).getStatusLine();
    Mockito.verify(statusLine, Mockito.times(1)).getStatusCode();
//    Mockito.verify(closableHttpResponse, Mockito.times(1)).getEntity();
    Assert.assertTrue(response.isSuccess());
  }

  @Test
  public void testUpdateCandidateDetail() throws Exception {
    this.additionalRequestParam = new HashMap<String, String>();
    this.additionalRequestParam.put("idCandidate", ID_CANDIDATE);
    URI uriUpdateCandidateDetail = new URI("/candidate/updateCandidateDetail");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_CANDIDATE_DETAIL, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriUpdateCandidateDetail);
    Mockito
        .when(this.httpClientHelper.invokePostType(uriUpdateCandidateDetail, this.file,
            MultipartFile.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS))
        .thenReturn(this.gdnBaseResponse);
    HttpPost httpPost = new HttpPost(uriUpdateCandidateDetail);
    httpPost.setConfig(RequestConfig.custom().setSocketTimeout(CONNECTION_TIMEOUT_IN_MS)
        .setConnectTimeout(CONNECTION_TIMEOUT_IN_MS).build());
    Mockito.when(this.httpClientHelper.createNewHttpPost(Mockito.any(URI.class),
        Mockito.eq(CONNECTION_TIMEOUT_IN_MS))).thenReturn(httpPost);
    // TODO
    // Mock Closeable
    CloseableHttpClient closeableHttpClient = Mockito.mock(CloseableHttpClient.class);
    // Mock getClosable httpConnectionSingleton
    Mockito.when(this.httpClientHelper.getClosableHttpConnectionSingleton())
        .thenReturn(closeableHttpClient);
    // Mock Response
    CloseableHttpResponse closableHttpResponse = Mockito.mock(CloseableHttpResponse.class);
    Mockito.when(closeableHttpClient.execute(httpPost)).thenReturn(closableHttpResponse);
    StatusLine statusLine = Mockito.mock(StatusLine.class);
    Mockito.when(closableHttpResponse.getStatusLine()).thenReturn(statusLine);
    Mockito.when(statusLine.getStatusCode()).thenReturn(200);
    FileInputStream fileMockResponse =
        new FileInputStream(new File("src/test/resources/JSON/fileMockResponse.json"));
    HttpEntity httpEntity = new ByteArrayEntity(IOUtils.toByteArray(fileMockResponse));
    Mockito.when(closableHttpResponse.getEntity()).thenReturn(httpEntity);

    GdnBaseRestResponse response = this.beirutApiClient.updateCandidateDetail(REQUEST_ID, USERNAME,
        ID_CANDIDATE, this.file.getOriginalFilename(), this.file.getBytes());

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_CANDIDATE_DETAIL, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper, Mockito.times(1)).getClosableHttpConnectionSingleton();
    Mockito.verify(closeableHttpClient, Mockito.times(1)).execute(httpPost);
    Mockito.verify(closableHttpResponse, Mockito.times(1)).getStatusLine();
    Mockito.verify(statusLine, Mockito.times(1)).getStatusCode();
//    Mockito.verify(closableHttpResponse, Mockito.times(1)).getEntity();
    Assert.assertTrue(response.isSuccess());
  }

  @Test
  public void testUpdateCandidateInformation() throws Exception {
    // TODO
  }

  @Test
  public void testUpdateCandidateStatus() throws Exception {
    objectMapper = new ObjectMapper();

    @SuppressWarnings("deprecation")
    String updateCandidateStatusRequestStringJson = FileUtils.readFileToString(
        new File("src/test/resources/JSON/updateCandidateStatusRequestJson.json"));
    UpdateCandidateStatusModelDTORequest updateCandidateStatusModelDTORequest =
        objectMapper.readValue(updateCandidateStatusRequestStringJson,
            UpdateCandidateStatusModelDTORequest.class);

    URI uriUpdateCandidateStatus = new URI("/candidate/updateCandidateStatus");

    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_CANDIDATE_STATUS, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriUpdateCandidateStatus);
    Mockito.when(this.httpClientHelper.invokePostType(uriUpdateCandidateStatus,
        updateCandidateStatusModelDTORequest, UpdateCandidateStatusModelDTORequest.class, typeRef,
        JSON, CONNECTION_TIMEOUT_IN_MS)).thenReturn(gdnBaseResponse);

    GdnBaseRestResponse response = this.beirutApiClient.updateCandidatesStatus(REQUEST_ID, USERNAME,
        updateCandidateStatusModelDTORequest);

    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_CANDIDATE_STATUS, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokePostType(uriUpdateCandidateStatus,
        updateCandidateStatusModelDTORequest, UpdateCandidateStatusModelDTORequest.class, typeRef,
        JSON, CONNECTION_TIMEOUT_IN_MS);
    Assert.assertNotNull(response);
    Assert.assertEquals(gdnBaseResponse, response);
  }

  @Test
  public void testUpdatePositionInformation() throws Exception {
    objectMapper = new ObjectMapper();
    String updatePositionRequestJson = "{\"id\":\"id\",\"title\":\"title\"}";
    PositionDTORequest positionDTORequest =
        objectMapper.readValue(updatePositionRequestJson, PositionDTORequest.class);

    URI uriUpdatePosition = new URI("/position/updatePositionInformation");
    Mockito.when(this.httpClientHelper.getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_POSITION_INFORMATION, this.mandatoryRequestParam,
        this.additionalRequestParam)).thenReturn(uriUpdatePosition);
    Mockito
        .when(this.httpClientHelper.invokePostType(uriUpdatePosition, positionDTORequest,
            PositionDTORequest.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS))
        .thenReturn(gdnBaseResponse);
    GdnBaseRestResponse response =
        this.beirutApiClient.updatePositionInformation(REQUEST_ID, USERNAME, positionDTORequest);
    Mockito.verify(this.httpClientHelper).getURI(HOST, PORT,
        CONTEXT_PATH_TEST + BeirutApiPath.UPDATE_POSITION_INFORMATION, this.mandatoryRequestParam,
        this.additionalRequestParam);
    Mockito.verify(this.httpClientHelper).invokePostType(uriUpdatePosition, positionDTORequest,
        PositionDTORequest.class, typeRef, JSON, CONNECTION_TIMEOUT_IN_MS);
    Assert.assertNotNull(response);
    Assert.assertEquals(gdnBaseResponse, response);
  }

}


This is a 2-day workshop with the charming, professional, experienced and motivating Iyengaryogateacher (Senior II) Kenan Albayrak. An background of 1-3 years of Iyengaryoga recommended for participants.
The theme of the workshop will be specified during spring months.
CO-FOUNDER (2000)AND CO-DIRECTOR (UNTIL 2009) OF THE IYENGAR YOGA ISTITUT FRANKFURT.
ACTIVE IN TEACHERS TRAININGS PROGRAMS IN FINLAND, NETHERLANDS, SWITZERLAND AND GERMANY.
MEMBER OF THE CERTIFICATION COMITTEE OF THE IYENGAR YOGA ASSOCIATION OF GERMANY.
ACTIVE AS AN ASSESSOR IN IYENGAR YOGA EXAMINATIONS IN GERMANY AND FINLAND.


The first sermon in, "The IncredibleSpirit" sermon series by Rev. Rudy Freese on 8/5/18.
The sermon, "Calming The Seas", by Rev. Rudy Freese on 6/24/18.
The sermon "Why Wait?" by Rev. Rudy Freese on 4/29/18.
The final sermon in the Giving It Up series titled, "Death" by Rev. Rudy Freese on Easter Sunday 2018.
Pastor Rudy's fourth sermon in The Bedlam Series, titled "4th & Inches" from 10/22/17.


text:
Dutch Citrix User Group
Mar 22 2023 @ 09:00 - 18:00 CET
The Dutch Citrix User Group, DuCUG for short, is a user group by and for the Citrix community in the Netherlands.
Primarily, but not exclusively, focused on Citrix products and technologies.
They organize a meeting twice a year with presentations focused on technology, customer cases, practical examples and discussions.
The meetings are accessible to a broad target group and offer many opportunities to get in touch with like-minded people.
De Duikenburg
VMware Explore
Nov 07 / Nov 10 2022
Workplace Ninja Summit 2022
Sep 12 / Sep 14 2022
E2EVC in Athens


text:
Q: footnote and autocite=footnote don't behave the same under fnpct This may sound like a crazy scenario, but whilst using fnpct (and the after-punct-space option especially) and the \autocite command from biblatex (using the option autocite=footnote), I realized the spacing around the footnote mark wasn't treated the same way as with the command \footnote. This is hardly noticeable in british, but very severe in french (from babel). A weird thing is that it is \footnote that doesn't seem to react to the after-punct-space option when french is the language, whereas \autocite does.
I'm using v2.8a of biblatex and fnpct v0.2k (2013/04/07).
Variants I tried:

*

*neither \frenchbsetup{FrenchFootnotes=false} nor
\usepackage[hang]{footmisc} help

*not using anything from biblatex at all (footnote is still problematic)

I'd be satisfied if I could redefine the basic \footnote like it's autocite=footnote version, but I'm not savvy enough to know how to dig that information up.
Here's a code example, tuned for maximal graphical effect (the right alignment just helps visualize things, for example):
\documentclass[french,12pt]{article}

\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fnpct}
\usepackage[babel]{csquotes}
\usepackage[autocite=footnote,autopunct=false]{biblatex}

\AdaptNoteOptNoMult\autocite

\renewcommand{\thempfootnote}{\arabic{mpfootnote}}

\begin{document}

\begin{minipage}{6cm}
\emph{Without \texttt{after-punct-space}:}
\begin{flushright}

Here I'm using footnote\footnote[2]{Check!}.

\setcounter{mpfootnote}{1}

And here\ldots\ autocite\autocite{nokeyneeded}.
\end{flushright}
\end{minipage}

\vspace*{1cm}

\setfnpct{after-punct-space=-1em}

\begin{minipage}{6cm}
\emph{With \texttt{after-punct-space}:}
\begin{flushright}
Here I'm using footnote\footnote[2]{Check!}.

\setcounter{mpfootnote}{1}

And here\ldots\ autocite\autocite{nokeyneeded}.
\end{flushright}
\end{minipage}

\end{document}

[edited to add the fnpct package version]

A: You've discovered two different and unrelated issues:

*

*The language definition file for French, frenchb.ldf, makes the following definitions at begin document:
\let\@footnotemarkORI\@footnotemark
\def\@footnotemarkFB{\leavevmode\unskip\unkern
                     \,\@footnotemarkORI}%

This disables fnpct's own adaptions. Since fnpct has the means to set all those spaces around footnote marks in different situations the definition from frenchb-ldf isn't really needed and can be reverted again after begin document:
\begin{document}
\makeatletter
\let\@footnotemark\@footnotemarkORI
\makeatother

*The issue with \autocite is quite different. Here, fnpct's mechansim strikes back: \auocite eventually inserts \footnote which has also been redefined by fnpct. That use of \footnote does not find a trailing punctuation and assumes it comes after a word. This is why it inserts the before-footnote-space which is what you're seeing.  The following example amplifies this:
\documentclass[12pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fnpct}
\usepackage[autocite=footnote,autopunct=false]{biblatex}

\renewcommand{\thempfootnote}{\arabic{mpfootnote}}

\AdaptNoteOptNoMult\autocite

\begin{document}

\begin{minipage}{6cm}
\begin{flushright}
  Here I'm using footnote\footnote[2]{Check!}.\par
  \setcounter{mpfootnote}{1}
  And here\ldots\ autocite\autocite{nokeyneeded}.\par
  \setcounter{mpfootnote}{1}
  \setfnpct{before-footnote-space=.5em}
  And here\ldots\ autocite\autocite{nokeyneeded}.\par
\end{flushright}
\end{minipage}

\end{document}

There is no easy fix other than setting
\setfnpct{before-footnote-space=0pt}

I will certainly fix issue 2 in fnpct (I already have fixed it in my development version). I'll probably also undo frenchb.ldf's redefinition of \@footnotemark when fnpct is loaded and instead adapt the before-footnote-space accordingly when French is the main document language.

Both issues are fixed in fnpct v0.4a 2013/12/23:
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{fnpct}[2013/12/23]
\usepackage[autocite=footnote,autopunct=false]{biblatex}

\renewcommand{\thempfootnote}{\arabic{mpfootnote}}

\AdaptNoteOptNoMult\autocite

\begin{document}

\begin{minipage}{6cm}
\begin{flushright}
  Here I'm using footnote\footnote[2]{Check!}.\par
  \setcounter{mpfootnote}{1}
  And here\ldots\ autocite\autocite{nokeyneeded}.\par
  \setcounter{mpfootnote}{1}
  Text\footnote{foo} text
\end{flushright}
\end{minipage}

\end{document}

redpajama_set_name: RedPajamaStackExchange


text:
Filipina expat: Being jailed with baby in Qatar 'blessing in disguise'
January 13, 2016 byVictoria Scott
Tommaso / Flickr
Photo for illustrative purposes only. Tommaso / Flickr
Updated on Jan. 17 with details about how to help
Shortly after Christmas three years ago, Filipina expat Mary (not her real name) was taken to jail by Qatar police after having a baby out of wedlock.
She then spent another two years in prison for unpaid debts. Now that she's been released, the 35-year-old has spoken candidly to Doha News about her arrest and imprisonment, including why she refused to run and how keeping her child with her in jail helped make the whole ordeal more bearable.
It was late in the evening on Dec. 26, 2012 when Mary sat down in her comfortable private room at the Al Ahli Hospital in Doha to await the police.
Her son, a healthy boy lying in the cot next to her bed, had been born by emergency caesarian section at the hospital five days earlier. A generous health insurance plan from her employer – an international company with a base in Qatar – had covered the cost.
A single mother who had worked in human resources here, Mary had been unable to produce a marriage certificate – a standard requirement for registering all births in Qatar – when hospital staff had requested it.
By having sex outside of marriage in Qatar, Mary had been breaking the law, and she knew that producing a baby from the union had sealed her fate.
Mary's friends had urged her to run, to leave the hospital before the police arrived, but she had decided to face the consequences of her actions.
Hospital staff knew that the law required that they should call the police, but they gave Mary one last chance, and suggested she call her embassy instead.
However, Philippines embassy staff were still on Christmas break, and no one came to help Mary and her baby.
As a result, she had been told that the police would come to collect her and her son that evening.
Separation fears
In an email to Doha News' Victoria Scott just before the birth asking for information about her legal situation, Mary explained that fear of being separated from her baby was her primary concern:
"All I want is for my baby to be safe and not be taken away from me. Please let me know if you know of anything about cases same as mine. I just want to know what to do and where to go to protect my baby."
Eventually, Mary told Doha News that wide-ranging inquiries she had made before the birth reassured her that her baby would not be taken from her.
Mary's three year old son, 'William' Supplied
She had also discovered that they would both spend up to a year in jail together, serving time for her crime.
"I knew I was going to be arrested, because you know, there was no other way.
So I told my friends (who suggested she run away) no, I know the consequences of running away from things, and then maybe forging something (a birth document). I told them no, I just want to stay and wait for the police."
Qatari law states that children up to the age of two can remain with their mothers in prison.
While this practice is very similar to policies in some other countries, including the UK – which lets mothers keep their babies with them until 18 months – the idea is still a subject of hot debate.
In September, Canada developed new guidelines on the matter, stating that taking a baby from his or her mother at birth is an act of discrimination against the child.
Mark Biddle/Flickr
Photo for illustrative purposes only. Mark Biddle/Flickr
CBC reported that in addition to benefitting the mother and the baby, seeing a child in jail could spur other incarcerated women to reflect about their own children and how they themselves could be better mothers.
However, Amnesty International told Doha News that it did not support children living in jails in any circumstances.
"Children in detention are often traumatized and have difficulty understanding why they are being punished despite not having committed a crime.
They rarely have access to adequate education, play and leisure facilities, and are often supervised by persons who are not trained to respond to the specific needs of migrant children," Amnesty said in a statement.
Two police officers, a man and a woman, arrived at 10pm that night and took Mary and her baby out of the hospital via a side entrance and into a waiting police car. Mary said she was keenly aware of the cool winter air outside, and held her baby close.
The pair were transferred to the Capital Security Police station in Najma, where police questioned Mary for several hours. She was asked about the baby's father, who she said is Turkish and had already left Qatar.
my_southborough/Flickr
Photo for illustrative purposes only. my_southborough/Flickr
Mary and her son William (not his real name) were transferred to a cell at around 3am.
"The first time I went to this room, it was dark, and I'd had a dream before I went to jail about this room – this exact scenario." Mary told Doha News. "I felt so scared, but I had to be strong and tough because I had my baby with me."
She and William were sharing with one other woman who was seven months pregnant. Staff offered Mary a cot for William, but he cried when he was put in it, so he shared her bed instead.
'Baby case'
Mary and her son remained in police custody for several weeks, awaiting her trial.
She said that at the Capital Security facility in Najma, she had access to a doctor and nurse throughout, adding that she was given good post-natal care.
She was provided with clothes and milk for her baby, and she said that the guards were kind to her. "They love babies," she said.
Rachel Pasch/Flickr
Photo for illustrative purposes only. Rachel Pasch/Flickr
Friends were allowed to visit, and bring clothes and food for her child, she added.
When she finally appeared before the courts, she was given the standard sentence for a so-called "baby case" in Qatar – a year in jail.
She was provided with a translator for the series of court sessions, but was not offered the services of a lawyer until the penultimate hearing.
"He was not very helpful at all. I don't know if he actually read my case because I spoke to him once only and he suggested that I tell the judge I was raped. I didn't take his advice."
Mary told us that the judge "barely asked her anything" and only allowed her to ask questions on the penultimate court visit before sentencing.
After the year-long sentence was handed down, Mary and her baby were then transferred to Qatar's main prison, which is on the outskirts of Doha just off of Salwa Road.
She didn't know then that she'd be sentenced to an additional two years in prison for unpaid debts.
Jail conditions
When Mary and William arrived at the jail, they were led to a room that they would share with five other mothers and babies.
Although most new parents would imagine this room to be very noisy, Mary said that the women all worked together to synchronize nap times, so it was bearable for all of them.
Christian Mönnig/Flickr
Photo for illustrative purposes only. Christian Mönnig/Flickr
Women with babies, the elderly and those with medical conditions were accommodated separately from the other women in the main jail, Mary said.
They had easy access to medical provisions, so Mary's post-partum healthcare needs were taken care of.
"The good side of being there was that they really took care of the people inside, especially the pregnant ladies and the babies," Mary said. "They have monthly check ups, they send them to Hamad hospital to give birth, they gave milk, diapers and clothes, blankets."
The prison provided a play room for babies, which was furnished with a TV and toys, and this proved a useful escape for moms whose infants were restless sleepers.
However, prisoners were only allowed to make a phone call once every 10 days. They were not permitted to receive or send letters, and only embassy staff or family members were allowed to visit them.
Maxim75/Wikicommons
Photo for illustrative purposes only. Maxim75/Wikicommons
This led to a feeling of isolation, as Qatar-based friends were kept away.
Unable to write letters, Mary kept a diary throughout her time in jail. This is an extract from a letter she wrote in it in September 2014 to her father, who died a year after she was first sent to prison:
"I miss you, Daddy and I love you so much. I am sorry for everything. It's been a year and I am so sorry that I am not yet able to visit you – I will – I promise you that. Please help me pray to God – that all these problems will be sorted out and hopefully we will be free and out soon."
Daily prison life
Mary described an environment that, although unfamiliar and rather basic, was also well-organized, clean and humane.
Inmates were required to wear a uniform every morning and cover their heads with a scarf in court or on hospital visits (even if non-Muslim), but were able to wear their own clothes during the afternoons and on weekends.
Female prisoners shared three bathrooms, which they had access to throughout the day.
darkthirty / Flickr
For illustrative purposes only. darkthirty / Flickr
Food was delivered to the women's rooms three times a day, and special diets for diabetics and babies were taken into account.
The women were also able to cook, either using leftovers from mealtimes or ingredients they were able to order for delivery from a local supermarket once a week.
They also had free access to a library of books in many different languages, and free optional Arabic and Islamic study classes.
They were invited to work in the prison workshops in the mornings making crafts to earn a small wage – QR15-20 a day – but Mary was unable to work as she had a baby to care for.
However, in September 2015 the Philippines Embassy began giving all of its jailed nationals QR150 a month, for which Mary said she was "very grateful."
Arnold Chao/Flickr
Photo for illustrative purposes only. Arnold Chao/Flickr
The women had one television for which they had a strict schedule so that the inmates of many different nationalities could watch TV in their native language each day.
Christian prisoners like Mary were allowed to pray privately in their rooms, but were banned from praying in groups in the common room after Muslim inmates complained, she said.
The women were given access to an outside exercise yard every day, from 6am to noon. The yard's surface was concrete, and Mary walked and ran around it for exercise. The jail also owned two exercise machines, she told us, but these were broken for the entire time she was incarcerated.
She remembers with fondness a visit from a member of staff from the Qatar Tennis Association, who visited the jail on Qatar National Sport Day and led a game of volleyball with the inmates.
'Love cases'
Mary told Doha News that the female population of the main jail fluctuated from 60 to 80 women during her three on and off years there.
Around half of those who were incarcerated were considered so-called "love cases" – women charged with having sex outside of marriage, extra-marital affairs, or getting pregnant when unmarried.
Mary met a great number of women in jail for these crimes in both the Capital Security facility in Najma and in the main jail. Many were domestic workers, she said.
Dimitris Papazimouris/Flickr
Photo for illustrative purposes only. Dimitris Papazimouris/Flickr
She told us about one woman who had been arrested after being raped by her sponsor's driver.
She had apparently been reported to the police by her sponsor on suspicion of having an illegal relationship, but she was checked by a police doctor and questioned by the prosecutor's office, found to be telling the truth, and later released.
It is unclear whether the driver in the case was ever arrested and charged.
When asked whether the authorities had focused on the women in these cases and disregarded the men, Mary said that at least some of the men involved in the "love cases" were also serving time in prison in the male section next door.
She told us however that at least one the baby's fathers had given himself up to police but hadn't been arrested, and others had been given shorter sentences than the women.
Babies in jail
Over her total sentence of three years, Mary met around 30 mothers in jail with their babies in Qatar. She estimated that around 80 percent of these women were domestic workers, the majority of whom were in jail for "love cases."
Under Qatari law, children up to the age of two years old are allowed to remain with their mothers in jail, after which they are supposed to be placed with a close relative or if none is available, a foster home.
In practice, however, Mary said that children up to the age of five years old were allowed.
Sarahkoller.com
Photo for illustrative purposes only. Sarahkoller.com
Mary's own son, who turned three in December, remained with her in jail throughout her incarceration at the Capital Security facility and the main jail, despite his age.
She said she recalled one time when the line had been drawn for another woman, however.
That person had arrived at Capital Security with a five-year-old child after being arrested in transit at Hamad International Airport.
The "Captain" at Capital Security refused to admit the child.
The woman's husband was also in custody, and the child had no family in Doha. As a result, the prison authorities arranged – with the couple's agreement – to send their child out of Qatar to be cared for by relatives overseas.
Throughout her incarceration, Mary struggled to find out even the most basic information about her legal situation, including the exact length of her sentence.
All court documents given to her were in Arabic, and a translation was not provided. She told Doha News that her appearances in court had been short, and that the judge always appeared rushed and was reluctant to let her ask questions.
Omar Chatriwala / Doha News
Photo for illustrative purposes only. Omar Chatriwala / Doha News
In a story in July 2014, we explained that Mary and William had been released and sent to Qatar's deportation center after a year, only to be sent back to the main jail when the authorities realized that Mary had more time to serve for a series of unpaid debts.
As she struggled to understand the number of charges she was facing, friends in Doha stepped in to help, photographing court documents and getting them translated. It turned out that she had to serve two more years in jail for her debts.
She said her eventual release in October 2015 came as a complete surprise.
Mary had recently written a letter to the prosecutor's office, translated for her into Arabic, explaining that she believed she had served out all of her sentences.
"I guess they read that and approved it," she said. "They told me I was being released only on the day itself. They woke us up early in the morning at 6.30am. They said, in Arabic, that we were being released. I had learned a little Arabic in jail, so I understood."
Mary quickly packed up her belongings, said goodbye to her friends, and then she and William were transported to Qatar's deportation center.
Here, men and women who have served their sentences – or those who have "run away" from their sponsors – wait to be allowed to fly home. For many, this can take anywhere from months to years.
Deportation center
Mary has been here before, in a brief interval between serving her first sentence for the "baby case" and going back to jail to serve time for her debts.
She was dreading it. Unlike the main jail, the deportation center was dirty and overcrowded.
"Deportation is more like a 'jail' than the actual Central Jail itself," Mary said. "There are always fights (especially over the single payphone). It is chaos."
Mary added that during her first visit in 2013, she had seen women sleeping in hallways and under beds.
She said the female guards were "not very nice" there, that they didn't speak English and would routinely shout at detainees.
Peter Kovessy
François Crépeau Peter Kovessy
Following a visit in 2013, the UN's Special Rapporteur on the human rights of migrants François Crépeau heavily criticized the Qatari government for poor conditions at the center.
He detailed his findings in a report published the following year. It states:
"The migrants lacked sheets, a change of clothes, soap and other hygienic products. Several migrants were sleeping on mattresses on the floor in the corridors."
The rapporteur also reported that some migrants had been denied medical care, although Mary said that she and William were always able to see a doctor at the center.
Chantelle D'mello
Photo for illustrative purposes only. Chantelle D'mello
Crépeau said he'd spoken to several different people – one of whom was a domestic worker who had been beaten and burned by her employer before running away – who claimed they had not been given proper medical attention.
"Access to a doctor was difficult, with no proper treatment given," the report states.
"The detainees reported that the only medication given was aspirin, regardless of their illness. The Special Rapporteur heard stories of pregnant women in detention not receiving prenatal care, including one who had miscarried inside the deportation center."
Crépeau was also concerned about restrictions on the ability of detainees to contact their families, with "limited access to legal assistance or consular services and virtually no professional interpretation services."
Mary told Doha News that she had rarely been able use the phone.
"They only have one payphone which they lock at certain times in a day and you have to wait for hours just to call because there are just too many girls for a single phone." she said.
She explained that contact with family and friends is vital in order for documentation to be processed as quickly as possible, hastening one's exit from the center.
Lack of communication also kept many of Mary's fellow detainees in the dark about the charges against them, and what was required for their release.
Ryan King/Flickr
Photo for illustrative purposes only. Ryan King/Flickr
Crépeau expressed concerns about the limited access to the outside world, saying many detainees had little knowledge about complaint mechanisms and how to challenge their detention.
Along with the addition of more phone access, Mary said she hoped the center would invest in kitchen facilities so that detainees didn't need to wash their plates in the toilet sinks, and also that bed sheets and pillows be regularly replaced, because they are "so old and dirty."
She also suggested that the manager of the Deportation Center make regular visits to each ward to ask for feedback on conditions, as she felt he was not aware of some of the poor conditions in the women's wing.
Mary's first visit to the deportation center only lasted a few weeks before she was moved to a shelter run by the Qatar Human Rights Committee for mothers and babies.
Kelly Hunter/Flickr
Photo for illustrative purposes only. Kelly Hunter/Flickr
This may be due to Crépeau.
His report recommended that the pregnant women he found in the center should be removed, and noted that although he found no children in the center during his visit, he had been told that "approximately 10 women with children had been removed from the center the day preceding his visit."
As she was at the center during the period of his visit to Qatar, Mary believes she was one of these women.
Amnesty International's Gulf migrant rights researcher Mustafa Qadri has also visited Qatar's immigration detention center.
During his visit in March 2015, Qadri told Doha News that he had seen "some attempts to improve conditions," but that the organization continued to have significant concerns about the facility, particularly about the detention of mothers and children within its walls.
"I have not personally witnessed children in the deportation center, but have heard of these reports and this is a serious concern – the deportation center is not a safe or healthy environment for children who remain at grave risk of abuse and trauma."
Kathea Pinto/Flickr
Photo for illustrative purposes only. Kathea Pinto/Flickr
Mercifully, it turned out that Mary's second visit to the deportation center was equally short. She asked to see the doctor soon after her arrival, and explained that her son had allergies that were exacerbated by the conditions in the center.
"I have learned that the most influential person in a jail, after the Captain, is the doctor," she told Doha News. "So the doctor recommended we were released, and we were. They sent me to live with cousins who live in Doha."
The outside world
As soon as she was released, Mary headed to Doha's Catholic Church with her son "to thank God for everything."
Navin Sam / Doha News
Qatar's Catholic church Navin Sam / Doha News
Then later, safely housed in her relatives' apartment, Mary celebrated, anticipating being back in the Philippines by Christmas.
When she spoke to Doha News just days after her release, she was beaming, playing with William and talking excitedly about her future plans.
Her embassy had renewed her passport and registered William's birth.
She took William outside into the world for the first time, showing him shops, restaurants, roads and parks.
Kamran Hanif/Flickr
Photo for illustrative purposes only. Kamran Hanif/Flickr
Surprisingly, Mary told us she didn't think he had found it too hard to adjust.
"He doesn't know that he was in prison. He thought it was just like a big house. I made it as normal for him as I could. He watched movies and I told him what things were like outside."
Stuck in Qatar
But Mary did not get home by Christmas.
Shortly after her release, she began the complicated procedure to help lift her travel ban, the final step before the embassy could book her and her son a flight home.
It soon became clear, however, that her situation was far from straightforward.
Paul Goyette/Flickr
Photo for illustrative purposes only. Paul Goyette/Flickr
Repeated visits to the prosecutor's department and the immigration office eventually revealed that two of the parties she had borrowed money from – a private individual and her bank – had also lodged civil cases against her for the debt, on top of the criminal cases.
Mary had been previously told by the civil court that the bank cases had been dealt with, and she is still trying to find out the exact amount she owes.
"It's not clear every time I go and ask for information. I just want to talk to someone who can tell me the whole situation so I can find a solution. All the documents are in Arabic."
She estimates however that the total amount is somewhere in the region of 250,000 QR including three years' worth of interest and fines.
As these civil cases were unresolved, she was told that her travel ban could not be lifted. She was informed that she would need to repay the money but she was unable to get a job to help raise funds, as she didn't have a residence permit.
Three months after her release from jail, Mary is still living in limbo, stuck in Qatar with no job and no visa, and with a child to support.
She spends most of her time trying to obtain her case documents, and visiting various government departments asking if they can help her.
Photo for illustrative purposes only.
She has been advised that she needs to hire a lawyer to help her unpick her situation, but she has no savings and no income.
"I'm kind of lost. There are files I need (for the case) which the prosecutor's office have told me they don't have, because they're old. I think I need a lawyer, but I'm struggling financially, to be honest. My family is supporting me, but we are struggling."
Mary told Doha News that she really wanted to find a job, because she was embarrassed to be relying on others for money, and that her family couldn't afford a lawyer.
Penn State/Flickr
Photo for illustrative purposes only. Penn State/Flickr
Still saddled with debts she cannot currently repay, she added that Qatari authorities should allow people to work to pay off their debts, instead of imposing jail sentences.
"I believe that if you want to collect your money back, it is not practical to put the person inside the jail – they can just put the travel ban.
I think a licensed department for assessing debts, restructuring and collecting of minimum payments would be very helpful."
A learning experience
When she does finally board a plane for Manila, Mary told us that she plans to spend some time with her family before embarking on another journey, this time to Australia.
There, she hopes to find a job and start a new life with her son.
She says that she has no plans to try to get in contact with William's father, but told us that if her son wanted to track him down later, she would be "ok with that."
Photo for illustrative purposes only. Qatar Airways
She is surprisingly sanguine about her three years in jail in Qatar, viewing it as an opportunity to mature and to learn new things about herself.
"It was a blessing in disguise. It opened my eyes. I made a lot of mistakes, I didn't think about the risks that I was running. It also helped me move on from my relationship with William's dad.
The time in jail also gave Mary a clear perspective on the true value of freedom:
"When I see people in Doha now fussing about things like waiting in a queue, complaining about small things, I think, you don't know how it was for me. There are bigger things than this."
This story was edited at 15:00 on January 13th to add details of Mary's total debt.
Mary's family have started a gofundme page for those wishing to help her raise funds for a lawyer and to help her make down payments on her debts. Click here if you'd like to contribute.
crimewomen