Example usage for javax.naming NamingException getResolvedObj

List of usage examples for javax.naming NamingException getResolvedObj

Introduction

In this page you can find the example usage for javax.naming NamingException getResolvedObj.

Prototype

public Object getResolvedObj() 

Source Link

Document

Retrieves the object to which resolution was successful.

Usage

From source file:com.gemstone.gemfire.security.GemFireSecurityExceptionTest.java

@Test
public void serializesWithNonSerializableNamingException() throws Exception {
    GemFireSecurityException instance = new GemFireSecurityException(this.message,
            this.nonSerializableNamingException);

    GemFireSecurityException cloned = (GemFireSecurityException) SerializationUtils.clone(instance);

    assertThat(cloned).hasMessage(this.message).hasCause(this.nonSerializableNamingException);
    NamingException cause = (NamingException) cloned.getCause();
    assertThat(cause).hasMessage(this.causeMessage);
    assertThat(cause.getResolvedObj()).isNull();
}

From source file:com.gemstone.gemfire.security.GemFireSecurityExceptionTest.java

@Test
public void serializesWithSerializableNamingException() throws Exception {
    GemFireSecurityException instance = new GemFireSecurityException(this.message,
            this.serializableNamingException);

    GemFireSecurityException cloned = (GemFireSecurityException) SerializationUtils.clone(instance);

    assertThat(cloned).hasMessage(this.message).hasCause(this.serializableNamingException);
    NamingException cause = (NamingException) cloned.getCause();
    assertThat(cause).hasMessage(this.causeMessage);
    assertThat(cause.getResolvedObj()).isNotNull().isEqualTo(this.serializableResolvedObj);
}