@@ -64,7 +64,7 @@ public void testBadUriLookup() throws Exception {
64
64
final int port = embeddedLdapRule .embeddedServerPort ();
65
65
final Context context = embeddedLdapRule .context ();
66
66
context .bind ("cn=" + RESOURCE + "," + DOMAIN_DSN , new Fruit ("Test Message" ));
67
- final StrLookup lookup = new JndiLookup ();
67
+ final StrLookup lookup = JndiLookup . createLookup ();
68
68
final String result = lookup .lookup (
69
69
LDAP_URL + port + "/" + "cn=" + RESOURCE + "," + DOMAIN_DSN + "?Type=A Type&Name=1100110&Char=!" );
70
70
if (result != null ) {
@@ -78,7 +78,7 @@ public void testReferenceLookup() throws Exception {
78
78
final int port = embeddedLdapRule .embeddedServerPort ();
79
79
final Context context = embeddedLdapRule .context ();
80
80
context .bind ("cn=" + RESOURCE + "," + DOMAIN_DSN , new Fruit ("Test Message" ));
81
- final StrLookup lookup = new JndiLookup ();
81
+ final StrLookup lookup = JndiLookup . createLookup ();
82
82
final String result = lookup .lookup (LDAP_URL + port + "/" + "cn=" + RESOURCE + "," + DOMAIN_DSN );
83
83
if (result != null ) {
84
84
fail ("Lookup returned an object" );
@@ -91,7 +91,7 @@ public void testSerializableLookup() throws Exception {
91
91
final int port = embeddedLdapRule .embeddedServerPort ();
92
92
final Context context = embeddedLdapRule .context ();
93
93
context .bind ("cn=" + TEST_STRING + "," + DOMAIN_DSN , "Test Message" );
94
- final StrLookup lookup = new JndiLookup ();
94
+ final StrLookup lookup = JndiLookup . createLookup ();
95
95
final String result = lookup .lookup (LDAP_URL + port + "/" + "cn=" + TEST_STRING + "," + DOMAIN_DSN );
96
96
if (result != null ) {
97
97
fail ("LDAP is enabled" );
@@ -104,7 +104,7 @@ public void testBadSerializableLookup() throws Exception {
104
104
final int port = embeddedLdapRule .embeddedServerPort ();
105
105
final Context context = embeddedLdapRule .context ();
106
106
context .bind ("cn=" + TEST_MESSAGE + "," + DOMAIN_DSN , new SerializableMessage ("Test Message" ));
107
- final StrLookup lookup = new JndiLookup ();
107
+ final StrLookup lookup = JndiLookup . createLookup ();
108
108
final String result = lookup .lookup (LDAP_URL + port + "/" + "cn=" + TEST_MESSAGE + "," + DOMAIN_DSN );
109
109
if (result != null ) {
110
110
fail ("Lookup returned an object" );
@@ -113,7 +113,7 @@ public void testBadSerializableLookup() throws Exception {
113
113
114
114
@ Test
115
115
public void testDnsLookup () throws Exception {
116
- final StrLookup lookup = new JndiLookup ();
116
+ final StrLookup lookup = JndiLookup . createLookup ();
117
117
final String result = lookup .lookup ("dns:/" + DOMAIN );
118
118
if (result != null ) {
119
119
fail ("No DNS data returned" );
0 commit comments