import org.sonar.api.resources.Language;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class JavaClassTest {
@Test
<BUG>public void shouldCreateJavaClassFromName() {

JavaClass javaClass = JavaClass.create("org.foo.Bar");
</BUG>
assertThat(javaClass.getClassName(), is("Bar"));

import org.sonar.api.resources.Language;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class JavaClassTest {
@Test
public void shouldCreateReferenceFromName() {
JavaClass javaClass = JavaClass.createRef("org.foo.Bar");
assertThat(javaClass.getClassName(), is("Bar"));
