DATAMONGO-1437 - Polishing.

Renamed test. Added JavaDoc. Simplify throws declaration.

Original pull request: #367.
This commit is contained in:
Mark Paluch
2016-06-02 08:55:09 +02:00
parent d147f80a39
commit c84bfbccf4

View File

@@ -33,8 +33,13 @@ import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import com.mongodb.DBRef; import com.mongodb.DBRef;
/**
* Unit tests for {@link LazyLoadingInterceptor}.
*
* @author Christoph Strobl
*/
@RunWith(MockitoJUnitRunner.class) @RunWith(MockitoJUnitRunner.class)
public class LazyLoadingInterceptorUntiTests { public class LazyLoadingInterceptorUnitTests {
public @Rule ExpectedException exception = ExpectedException.none(); public @Rule ExpectedException exception = ExpectedException.none();
@@ -46,8 +51,7 @@ public class LazyLoadingInterceptorUntiTests {
* @see DATAMONGO-1437 * @see DATAMONGO-1437
*/ */
@Test @Test
public void shouldPreserveCauseForNonTranslatableExceptions() public void shouldPreserveCauseForNonTranslatableExceptions() throws Throwable {
throws NoSuchMethodException, SecurityException, Throwable {
NullPointerException npe = new NullPointerException("Some Exception we did not think about."); NullPointerException npe = new NullPointerException("Some Exception we did not think about.");
when(callbackMock.resolve(propertyMock)).thenThrow(npe); when(callbackMock.resolve(propertyMock)).thenThrow(npe);