<s> import unittest <EOL> from unittest . mock import patch <EOL> from Javatar . core . java_utils import JavaUtils <EOL> class TestJavaUtils ( unittest . TestCase ) : <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = True <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> def test_to_readable_class_path_default ( self , * _ ) : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_readable_class_path ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = False <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> def test_to_readable_class_path_unknown ( self , * _ ) : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_readable_class_path ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = True <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> def test_to_readable_class_path_normal ( self , * _ ) : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_readable_class_path ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> def test_is_class_path_invalid ( self ) : <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . is_class_path ( test , special = False ) , <EOL> False <EOL> ) <EOL> def test_is_class_path ( self ) : <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . is_class_path ( test , special = False ) , <EOL> True <EOL> ) <EOL> def test_is_class_path_invalid_special ( self ) : <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . is_class_path ( test , special = True ) , <EOL> False <EOL> ) <EOL> def test_is_class_path_special ( self ) : <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . is_class_path ( test , special = True ) , <EOL> True <EOL> ) <EOL> def test_normalize_package_path ( self ) : <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . normalize_package_path ( test ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> tests = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" <EOL> ] <EOL> for test in tests : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . normalize_package_path ( test ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> @ patch ( <EOL> "<STR_LIT>" , <EOL> return_value = "<STR_LIT>" <EOL> ) <EOL> def test_to_package ( self , * _ ) : <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" , <EOL> relative = False <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" , <EOL> relative = False <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> JavaUtils ( ) . to_package ( <EOL> "<STR_LIT>" , <EOL> relative = False <EOL> ) . as_class_path ( ) , <EOL> "<STR_LIT>" <EOL> ) </s>
