- Sort Score
- Num 10 results
- Language All
Results 31 - 35 of 35 for thenThrow (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/test/java/jcifs/util/HMACT64Test.java
mockedCrypto.when(Crypto::getMD5).thenReturn(mockMd5); HMACT64 originalHmac = new HMACT64(TEST_KEY); when(mockMd5.clone()).thenThrow(new CloneNotSupportedException("Test Clone Not Supported")); assertThrows(IllegalStateException.class, originalHmac::clone); } }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14.6K bytes - Click Count (0) -
src/test/java/jcifs/internal/AllocInfoTest.java
// Given byte[] buffer = new byte[100]; when(mockAllocInfo.decode(any(byte[].class), anyInt(), anyInt())) .thenThrow(new jcifs.internal.SMBProtocolDecodingException("Test error")); // When & Then assertThrows(jcifs.internal.SMBProtocolDecodingException.class, () -> mockAllocInfo.decode(buffer, 0, buffer.length));Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.8K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java
DcerpcPipeHandle handle = createMockedDcerpcPipeHandle(); CIFSException exception = new CIFSException("Test exception"); when(mockSmbPipeHandleInternal.getSessionKey()).thenThrow(exception); assertThrows(CIFSException.class, handle::getSessionKey); } } @Nested @DisplayName("Send/Receive Fragment Tests") class SendReceiveFragmentTests {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 21K bytes - Click Count (0) -
src/test/java/jcifs/netbios/NbtAddressTest.java
nbtAddress.calledName = NbtAddress.SMBSERVER_NAME; // Manually set for this test case when(mockNameServiceClient.getNodeStatus(nbtAddress)).thenThrow(new UnknownHostException()); assertNull(nbtAddress.nextCalledName(mockContext)); verify(mockNameServiceClient).getNodeStatus(nbtAddress); } @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.4K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java
void testEncodeWithException() { CreateContextRequest request = mock(CreateContextRequest.class); byte[] buffer = new byte[100]; when(request.encode(any(byte[].class), anyInt())).thenThrow(new RuntimeException("Test error")); assertThrows(RuntimeException.class, () -> request.encode(buffer, 0)); } } @Nested @DisplayName("Test Implementation Tests")
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 24.9K bytes - Click Count (0)