17
17
18
18
import com .mongodb .internal .binding .ReadBinding ;
19
19
import com .mongodb .internal .connection .OperationContext ;
20
- import com .mongodb .internal .diagnostics .logging .Logger ;
21
- import com .mongodb .internal .diagnostics .logging .Loggers ;
22
20
import com .mongodb .internal .operation .ListCollectionsOperation ;
23
21
import org .bson .BsonDocument ;
24
22
import org .bson .codecs .BsonDocumentCodec ;
31
29
import static org .mockito .Mockito .when ;
32
30
33
31
final class InsufficientStubbingDetectorDemoTest {
34
- private static final Logger LOGGER = Loggers .getLogger (InsufficientStubbingDetectorDemoTest .class .getSimpleName ());
35
32
36
33
private ListCollectionsOperation <BsonDocument > operation ;
37
34
@@ -43,20 +40,20 @@ void beforeEach() {
43
40
@ Test
44
41
void mockObjectWithDefaultAnswer () {
45
42
ReadBinding binding = Mockito .mock (ReadBinding .class );
46
- LOGGER . trace ( "" , assertThrows (NullPointerException .class , () -> operation .execute (binding ) ));
43
+ assertThrows (NullPointerException .class , () -> operation .execute (binding ));
47
44
}
48
45
49
46
@ Test
50
47
void mockObjectWithThrowsException () {
51
48
ReadBinding binding = Mockito .mock (ReadBinding .class ,
52
49
new ThrowsException (new AssertionError ("Insufficient stubbing for " + ReadBinding .class )));
53
- LOGGER . trace ( "" , assertThrows (AssertionError .class , () -> operation .execute (binding ) ));
50
+ assertThrows (AssertionError .class , () -> operation .execute (binding ));
54
51
}
55
52
56
53
@ Test
57
54
void mockObjectWithInsufficientStubbingDetector () {
58
55
ReadBinding binding = MongoMockito .mock (ReadBinding .class );
59
- LOGGER . trace ( "" , assertThrows (AssertionError .class , () -> operation .execute (binding ) ));
56
+ assertThrows (AssertionError .class , () -> operation .execute (binding ));
60
57
}
61
58
62
59
@ Test
0 commit comments