@Test public void jvm_vitals() { uaaMetricsEmitter.emitJvmVitals(); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.cpu.load"), and(geq(0l), leq(100l))); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.thread.count"), and(gt(1l), leq(1000l))); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.init"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.committed"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.used"), gt(0l)); //Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.max"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.init"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.committed"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.used"), gt(0l)); //Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.max"), gt(0l)); }
/** * Delegates call to {@link AdditionalMatchers#and(byte, byte)}. */ default byte and(byte first, byte second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(char, char)}. */ default char and(char first, char second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(int, int)}. */ default int and(int first, int second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(T, T)}. */ default <T> T and(T first, T second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(int, int)}. */ default int and(int first, int second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(short, short)}. */ default short and(short first, short second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(double, double)}. */ default double and(double first, double second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(boolean, boolean)}. */ default boolean and(boolean first, boolean second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(float, float)}. */ default float and(float first, float second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(double, double)}. */ default double and(double first, double second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(float, float)}. */ default float and(float first, float second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(boolean, boolean)}. */ default boolean and(boolean first, boolean second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(long, long)}. */ default long and(long first, long second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(short, short)}. */ default short and(short first, short second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(byte, byte)}. */ default byte and(byte first, byte second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(long, long)}. */ default long and(long first, long second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(T, T)}. */ default <T> T and(T first, T second) { return AdditionalMatchers.and(first, second); }
/** * Delegates call to {@link AdditionalMatchers#and(char, char)}. */ default char and(char first, char second) { return AdditionalMatchers.and(first, second); }
@Test public void testReadDuplicateComponentIds() throws IOException { JPEGImageReader reader = createReader(); try { reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource("/jpeg/duplicate-component-ids.jpg"))); IIOReadWarningListener listener = mock(IIOReadWarningListener.class); reader.addIIOReadWarningListener(listener); assertEquals(367, reader.getWidth(0)); assertEquals(242, reader.getHeight(0)); BufferedImage image = reader.read(0, null); verify(listener, times(1)).warningOccurred(eq(reader), and(matches("(?i).*duplicate component ID.*(?-i)SOF.*"), contains("1"))); verify(listener, times(1)).warningOccurred(eq(reader), and(matches("(?i).*duplicate component ID.*(?-i)SOS.*"), contains("1"))); assertNotNull(image); assertEquals(367, image.getWidth()); assertEquals(242, image.getHeight()); assertEquals(ColorSpace.TYPE_RGB, image.getColorModel().getColorSpace().getType()); } finally { reader.dispose(); } }