Skip to content

Commit 56144c1

Browse files
committed
Minor test cleanup
1 parent 36238da commit 56144c1

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

src/test/java/com/fasterxml/jackson/databind/ser/ImmutablesTypeSerializationTest.java renamed to src/test/java/com/fasterxml/jackson/databind/interop/ImmutablesTypeSerializationTest.java

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
package com.fasterxml.jackson.databind.ser;
1+
package com.fasterxml.jackson.databind.interop;
2+
3+
import java.io.IOException;
4+
import java.util.ArrayList;
5+
import java.util.List;
6+
import java.util.Objects;
27

38
import com.fasterxml.jackson.annotation.JsonAutoDetect;
49
import com.fasterxml.jackson.annotation.JsonCreator;
510
import com.fasterxml.jackson.annotation.JsonProperty;
11+
612
import com.fasterxml.jackson.core.type.TypeReference;
13+
714
import com.fasterxml.jackson.databind.ObjectMapper;
815
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
916
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10-
import org.junit.Test;
1117

12-
import java.io.IOException;
13-
import java.util.ArrayList;
14-
import java.util.List;
15-
import java.util.Objects;
18+
import org.junit.Test;
1619

1720
import static org.junit.Assert.assertEquals;
1821

1922
/**
2023
* Tests for serialization and deserialization of objects based on
2124
* <a href="https://immutables.github.io/">immutables</a>.
25+
*<p>
26+
* Originally to verify fix for
27+
* <a href="https://github.com/FasterXML/jackson-databind/pull/2894">databind#2894</a>
28+
* to guard against regression.
2229
*/
2330
public class ImmutablesTypeSerializationTest
2431
{
25-
2632
/*
2733
* Interface Definitions based on the immutables annotation processor: https://immutables.github.io/
2834
*/
@@ -57,7 +63,7 @@ static final class ImmutableAccount
5763
private final Long id;
5864
private final String name;
5965

60-
private ImmutableAccount(Long id, String name) {
66+
ImmutableAccount(Long id, String name) {
6167
this.id = id;
6268
this.name = name;
6369
}
@@ -143,7 +149,7 @@ public static final class Builder {
143149
private Long id;
144150
private String name;
145151

146-
private Builder() {
152+
Builder() {
147153
}
148154

149155
public final ImmutableAccount.Builder from(ImmutablesTypeSerializationTest.Account instance) {
@@ -187,7 +193,7 @@ static final class ImmutableKey<T>
187193
implements ImmutablesTypeSerializationTest.Key<T> {
188194
private final T id;
189195

190-
private ImmutableKey(T id) {
196+
ImmutableKey(T id) {
191197
this.id = id;
192198
}
193199

@@ -252,7 +258,7 @@ public static final class Builder<T> {
252258

253259
private T id;
254260

255-
private Builder() {
261+
Builder() {
256262
}
257263

258264
public final ImmutableKey.Builder<T> from(ImmutablesTypeSerializationTest.Key<T> instance) {
@@ -288,7 +294,7 @@ static final class ImmutableEntry<K, V>
288294
private final K key;
289295
private final V value;
290296

291-
private ImmutableEntry(K key, V value) {
297+
ImmutableEntry(K key, V value) {
292298
this.key = key;
293299
this.value = value;
294300
}
@@ -374,7 +380,7 @@ public static final class Builder<K, V> {
374380
private K key;
375381
private V value;
376382

377-
private Builder() {
383+
Builder() {
378384
}
379385

380386
public final ImmutableEntry.Builder<K, V> from(ImmutablesTypeSerializationTest.Entry<K, V> instance) {

0 commit comments

Comments
 (0)