@Test
public void testEmptyTimestamp() {

    Transform fillTransform = new FillTransform();
    List<String> constants = new ArrayList<String>();
    constants.add("-1d");
    constants.add("");
    constants.add("10m");
    constants.add("0m");
    constants.add("100.0");
    constants.add(String.valueOf(System.currentTimeMillis()));
    constants.add("true");
    Long expectedStartTimestamp = System.currentTimeMillis() - 1L * 86400L * 1000L;
    Long expectedEndTimestamp = System.currentTimeMillis();
    int expectedSize = (int) ((expectedEndTimestamp - expectedStartTimestamp) / (10 * 60 * 1000) + 1);
    List<Metric> result = fillTransform.transform(null, null, constants);
    assertEquals(result.get(0).getDatapoints().size(), expectedSize);
    Long[] timestampSet = new Long[result.get(0).getDatapoints().keySet().size()];
    result.get(0).getDatapoints().keySet().toArray(timestampSet);
    assertEquals(true, timestampSet[0] - expectedStartTimestamp <= 1000L);
    assertEquals(true, timestampSet[timestampSet.length - 1] - expectedEndTimestamp <= 1000L);
    assertEquals(new HashSet<Double>(Arrays.asList(100.0)), new HashSet<Double>(result.get(0).getDatapoints().values()));
}