/*
 * Copyright (c) 2009 Openwave Systems Inc. All rights reserved.
 *
 * The copyright to the computer software herein is the property of
 * Openwave Systems Inc. The software may be used and/or copied only
 * with the written permission of Openwave Systems Inc. or in accordance
 * with the terms and conditions stipulated in the agreement/contract
 * under which the software has been supplied.
 *
 * $Id: $
 */
package me.prettyprint.hector.api;


import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import org.junit.Test;

import me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution;
import me.prettyprint.cassandra.service.clock.MicrosecondsSyncClockResolution;
import me.prettyprint.cassandra.service.clock.MillisecondsClockResolution;
import me.prettyprint.cassandra.service.clock.SecondsClockResolution;
import me.prettyprint.hector.api.factory.HFactory;

/**
 * @author Patricio Echague (patricioe@gmail.com)
 *
 */
public class HFactoryTest {

  @Test
  public void testCreateClockResolution() throws Exception {
    try {
      HFactory.createClockResolution("ItDoesNotExist");
      fail();
    } catch (RuntimeException e) {
        // good!
    }

    assertTrue(HFactory.createClockResolution(ClockResolution.SECONDS) instanceof SecondsClockResolution);
    assertTrue(HFactory.createClockResolution(ClockResolution.MILLISECONDS) instanceof MillisecondsClockResolution);
    assertTrue(HFactory.createClockResolution(ClockResolution.MICROSECONDS) instanceof MicrosecondsClockResolution);
    assertTrue(HFactory.createClockResolution(ClockResolution.MICROSECONDS_SYNC)
            instanceof MicrosecondsSyncClockResolution);
  }
}

@@ -490,26 +490,17 @@
 .Assert.
-assertTrue
+*
 ;%0D%0Aimpor
@@ -556,24 +556,148 @@
 it.Test;%0D%0A%0D%0A
+import me.prettyprint.cassandra.serializers.LongSerializer;%0D%0Aimport me.prettyprint.cassandra.serializers.StringSerializer;%0D%0A
 import me.pr
@@ -979,32 +979,81 @@
 ockResolution;%0D%0A
+import me.prettyprint.hector.api.beans.HColumn;%0D%0A
 import me.pretty
@@ -1829,16 +1829,16 @@
 _SYNC)%0D%0A
-
         
@@ -1892,11 +1892,490 @@
 ;%0D%0A  %7D%0D%0A
+  %0D%0A  @Test%0D%0A  public void testCreateColumn() %7B%0D%0A%09  long clock = HFactory.createClock();%0D%0A%09  HColumn%3CString, Long%3E col = HFactory.createColumn(%22nameString%22, new Long(%22345%22), clock);%0D%0A%09  HColumn%3CString, Long%3E col2 = HFactory.createColumn(%22nameString%22, new Long(%22345%22), clock, StringSerializer.get(), LongSerializer.get());%0D%0A%09  assertEquals(col.getName(), col2.getName());%0D%0A%09  assertEquals(col.getValue(), col2.getValue());%0D%0A%09  assertEquals(col.getClock(), col2.getClock());%0D%0A  %7D%0D%0A
 %7D%0D%0A

Add test for #329