use of org.talend.sdk.component.api.service.cache.LocalCache in project component-runtime by Talend.
the class LocalCacheServiceTest method serialize.
@Test
void serialize() throws IOException, ClassNotFoundException {
DynamicContainerFinder.LOADERS.put("LocalCacheServiceTest", Thread.currentThread().getContextClassLoader());
DynamicContainerFinder.SERVICES.put(LocalCache.class, new LocalCacheService("tmp"));
try {
final LocalCache cache = new LocalCacheService("LocalCacheServiceTest");
final LocalCache copy = roundTrip(cache);
assertNotNull(copy);
} finally {
DynamicContainerFinder.LOADERS.remove("LocalCacheServiceTest");
DynamicContainerFinder.SERVICES.remove(LocalCache.class);
}
}
Aggregations