|
| 1 | +/* |
| 2 | + * Copyright (C) 2024 Hedera Hashgraph, LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
1 | 17 | package com.hedera.block.server;
|
2 | 18 |
|
| 19 | +import static com.hedera.block.protos.BlockStreamService.BlockItem; |
| 20 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
| 21 | +import static org.mockito.ArgumentMatchers.any; |
| 22 | +import static org.mockito.Mockito.never; |
| 23 | +import static org.mockito.Mockito.verify; |
| 24 | + |
3 | 25 | import com.google.protobuf.Descriptors;
|
4 | 26 | import com.hedera.block.server.data.ObjectEvent;
|
5 | 27 | import com.hedera.block.server.mediator.StreamMediator;
|
6 | 28 | import com.hedera.block.server.producer.ItemAckBuilder;
|
| 29 | +import java.io.IOException; |
| 30 | +import java.security.NoSuchAlgorithmException; |
7 | 31 | import org.junit.jupiter.api.Test;
|
8 | 32 | import org.junit.jupiter.api.extension.ExtendWith;
|
9 | 33 | import org.mockito.Mock;
|
10 | 34 | import org.mockito.junit.jupiter.MockitoExtension;
|
11 | 35 |
|
12 |
| -import java.io.IOException; |
13 |
| -import java.security.NoSuchAlgorithmException; |
14 |
| - |
15 |
| -import static com.hedera.block.protos.BlockStreamService.BlockItem; |
16 |
| -import static org.junit.jupiter.api.Assertions.assertEquals; |
17 |
| -import static org.mockito.ArgumentMatchers.any; |
18 |
| -import static org.mockito.Mockito.never; |
19 |
| -import static org.mockito.Mockito.verify; |
20 |
| - |
21 | 36 | @ExtendWith(MockitoExtension.class)
|
22 | 37 | public class BlockStreamServiceTest {
|
23 | 38 |
|
24 |
| - @Mock |
25 |
| - private ItemAckBuilder itemAckBuilder; |
| 39 | + @Mock private ItemAckBuilder itemAckBuilder; |
26 | 40 |
|
27 |
| - @Mock private StreamMediator<ObjectEvent<com.hedera.block.protos.BlockStreamService.BlockItem>, com.hedera.block.protos.BlockStreamService.BlockItem> streamMediator; |
| 41 | + @Mock |
| 42 | + private StreamMediator< |
| 43 | + ObjectEvent<com.hedera.block.protos.BlockStreamService.BlockItem>, |
| 44 | + com.hedera.block.protos.BlockStreamService.BlockItem> |
| 45 | + streamMediator; |
28 | 46 |
|
29 | 47 | @Test
|
30 | 48 | public void testServiceName() throws IOException, NoSuchAlgorithmException {
|
|
0 commit comments