package study.hard.javalib.nativelib;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MathTest {

	private static Logger logger = LoggerFactory.getLogger(MathTest.class);

	private Double amount;
	private Double ratio;
	private Double result;

	@Before
	public void setUp() {
		amount = 0D;
		ratio = 0D;
		result = 0D;
		logger.debug("amount: {} / ratio: {} / result: {}", new Object[] {amount, ratio, result});
	}

	@Test
	public void floor() {
		amount = 39000.000D;
		ratio = 0.020D;
		result = Math.floor(amount * ratio);

		logger.debug("result: {}", result);

		assertEquals(new Double(780D), result);
	}

}

@@ -713,10 +713,480 @@
 t);%0A%09%7D%0A%0A
+%09@Test%0A%09public void ceil() %7B%0A%09%09logger.debug(%22(3 / 7): %22 + (3 / 7));%0A%09%09logger.debug(%22(3D / 7D): %22 + (3D / 7D));%0A%09%09logger.debug(%22Math.ceil(3 / 7): %22 + Math.ceil(3 / 7));%0A%09%09logger.debug(%22Math.ceil(3D / 7D): %22 + Math.ceil(3D / 7D));%0A%09%09logger.debug(%22(int)Math.ceil(3 / 7): %22 + (int)Math.ceil(3 / 7));%0A%09%09logger.debug(%22(int)Math.ceil(3D / 7D): %22 + (int)Math.ceil(3D / 7D));%0A%09%09logger.debug(%22(int)Math.ceil((double)3 / (double)7): %22 + (int)Math.ceil((double)3 / (double)7));%0A%09%7D%0A%0A
 %7D%0A

Add test case related to devide numbers.