public static void main(String[] args) {
   try {
     Upper x = new Upper();
     x.upper("README.txt", "kopi.txt");
   } catch (IOException kesalahan) {
     System.out.printf("Terjadi kesalahan : %s", kesalahan);
   }
 }
  public void testEvaluate() {
    Upper upper = Upper.getInstance();

    // Test empty string.
    TextValue textValue = (TextValue) upper.evaluate(Lists.<Value>newArrayList(new TextValue("")));
    assertEquals(textValue.getValue(), "");

    // Basic test.
    textValue = (TextValue) upper.evaluate(Lists.<Value>newArrayList(new TextValue("aBc")));
    assertEquals(textValue.getValue(), "ABC");
  }
  public void testValidateParameters() {
    Upper upper = Upper.getInstance();

    // Verify that Upper does not accept 0 parameters.
    try {
      upper.validateParameters(Lists.<ValueType>newArrayList());
      fail();
    } catch (InvalidQueryException e) {
      // Do nothing - this is the expected behavior.
    }

    // Verify that Upper does not accept more than 1 parameter.
    try {
      upper.validateParameters(Lists.newArrayList(ValueType.TEXT, ValueType.TEXT));
      fail();
    } catch (InvalidQueryException e) {
      // Do nothing - this is the expected behavior.
    }

    // Verify that Upper does not accept a non-Text parameter.
    try {
      upper.validateParameters(Lists.newArrayList(ValueType.DATE));
      fail();
    } catch (InvalidQueryException e) {
      // Do nothing - this is the expected behavior.
    }

    // Verify that Upper accepts 1 TEXT parameter.
    try {
      upper.validateParameters(Lists.newArrayList(ValueType.TEXT));
    } catch (InvalidQueryException e) {
      fail();
    }
  }