Tabnine Logo
PrototypesProvider.createSerializer
Code IndexAdd Tabnine to your IDE (free)

How to use
createSerializer
method
in
rocks.inspectit.agent.java.spring.PrototypesProvider

Best Java code snippets using rocks.inspectit.agent.java.spring.PrototypesProvider.createSerializer (Showing top 7 results out of 315)

origin: inspectIT/inspectIT

@BeforeMethod
public void setup() {
  doReturn(new File(TEST_CACHE_FILE)).when(fileResolver).getClassHashCacheFile();
  when(prototypesProvider.createSerializer()).thenReturn(serializationManager);
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExists() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = UnderlyingSystemInfo.JAVA_RUNTIME_VERSION;
  Object hashes = Collections.singletonMap("fqn", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(false));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsException() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  when(serializationManager.deserialize(Matchers.<Input> any())).thenThrow(new SerializationException());
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

@Test
public void noCacheFileExists() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  verifyZeroInteractions(serializationManager);
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsJavaCached() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = UnderlyingSystemInfo.JAVA_RUNTIME_VERSION;
  Object hashes = Collections.singletonMap("java.lang.String", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(false));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsJavaNotCached() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = "some_other_version";
  Object hashes = Collections.singletonMap("java.lang.String", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

serializationManager = prototypesProvider.createSerializer();
rocks.inspectit.agent.java.springPrototypesProvidercreateSerializer

Javadoc

Returns the new SerializationManager enhanced by Spring.

Popular methods of PrototypesProvider

    Popular in Java

    • Finding current android device location
    • getSupportFragmentManager (FragmentActivity)
    • getExternalFilesDir (Context)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • FileNotFoundException (java.io)
      Thrown when a file specified by a program cannot be found.
    • FileWriter (java.io)
      A specialized Writer that writes to a file in the file system. All write requests made by calling me
    • GregorianCalendar (java.util)
      GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
    • TreeMap (java.util)
      Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
    • Pattern (java.util.regex)
      Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
    • Logger (org.slf4j)
      The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
    • Top Sublime Text plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now