package jdk.statement;

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

/**
 * 
 * 
 * @since 2017-07-27
 * @author fixalot
 */
public class CastingTest {
	@SuppressWarnings("unused")
	private static final Logger logger = LoggerFactory.getLogger(CastingTest.class);

	@Test
	public void castFromNull() {
		Object imnotnotnull = null;
		String string = (String) imnotnotnull;
		Assert.assertNull(string);
	}

	@Test
	public void upCasting() {

	}

	@Test
	public void downCasting() {

	}
}

@@ -126,24 +126,34 @@
 ry;%0A%0A/**%0A * 
+%EC%BA%90%EC%8A%A4%ED%8C%85 %ED%85%8C%EC%8A%A4%ED%8A%B8 %EC%9C%A0%EB%8B%9B
 %0A * %0A * @sin
@@ -220,37 +220,8 @@
 t %7B%0A
-%09@SuppressWarnings(%22unused%22)%0A
 %09pri
@@ -327,16 +327,20 @@
 cast
-From
 Null
+ToString
 () %7B
@@ -482,49 +482,715 @@
 ) %7B%0A
-%0A%09%7D%0A%0A%09@Test%0A%09public void downCasting() %7B%0A
+%09%09Child c = new Child();%0A%09%09Parent p = c;%0A%09%09Assert.assertEquals(%22Child%22, p.getName());%0A//%09%09p.play(); // undefined method%0A%09%7D%0A%0A%09@Test%0A%09public void downCasting() %7B%0A%09%09// %EC%9A%94%EB%A1%9C%EC%BC%80%EB%8A%94 %EC%95%88%EB%90%A8.%0A%09%09try %7B%0A%09%09%09Parent p = new Parent();%0A%09%09%09@SuppressWarnings(%22unused%22)%0A%09%09%09Child c = (Child) p;%0A%09%09%7D catch (ClassCastException e) %7B%0A%09%09%09logger.debug(%22%EC%BA%90%EC%8A%A4%ED%8C%85 %EC%9D%B5%EC%85%89%EC%85%98 %EB%B0%9C%EC%83%9D%ED%95%A8.%22);%0A%09%09%7D%0A%09%09%0A%09%09// %EC%9A%94%EB%A1%9C%EC%BC%80%EB%8A%94 %EB%90%A8.%0A%09%09Parent p = new Child();%0A%09%09Child c = (Child) p;%0A%09%09%0A%09%09Assert.assertEquals(%22Child%22, c.getName());%0A%09%09c.play();%0A%09%7D%0A%09%0A%09private class Parent %7B%0A%09%09public String getName() %7B%0A%09%09%09return %22Parent%22;%0A%09%09%7D%0A%09%7D%0A%09%0A%09private class Child extends Parent %7B%0A%09%09public void play() %7B%0A%09%09%09logger.debug(%22uoo-hoo!%22);%0A%09%09%7D%0A%09%09%0A%09%09@Override%0A%09%09public String getName() %7B%0A%09%09%09return %22Child%22;%0A%09%09%7D
 %0A%09%7D%0A

add test unit