Mockito
Guava
Our great sponsors
Mockito | Guava | |
---|---|---|
11 | 58 | |
14,568 | 49,364 | |
0.8% | 0.4% | |
9.0 | 9.6 | |
about 19 hours ago | about 8 hours ago | |
Java | Java | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Mockito
-
Wednesday Links - Edition 2023-01-18
Mockito 5 Released (1 min)π https://github.com/mockito/mockito/releases/tag/v5.0.0
- Mockito 5.0.0 released, requires Java 11
- Mockito 5: prepare for future JDK versions
- 5 easy paths to become a recognized Java expert. Really. For free.
-
Mockito and non-debuggable testBuildTypes
For those using a "release" testBuildType for integration tests, what does your mocking setup look like? My app is stuck on Mockito 2.23.4, because higher (> 1.8.12) versions of Byte Buddy required beyond that point [do not play nicely with non-debuggable APKs](https://github.com/mockito/mockito/issues/2302). Solutions I've considered so far:
- Mockito - Most popular Mocking framework for unit tests written in Java
-
20+ Trending and Popular Java Open Source Project
Mockito
-
Reverse engineering Mockito. Part 2. Dynamic dependency injection
The code is pretty self explanatory but here's a quick run down. o.getClass().getDeclaredFields() gets us an array of all the fields. We then have a enhanced for loop that loops over the array. Check if the field is annotated field.isAnnotationPresent(Gucci.class). If it is then we set its modifier to true with field.setAccessible(true);. If we don't do this and the field is private we will get an error. Then we get the binary name of the field, field.getGenericType().getTypeName();, remember its just the package and the class name. Lastly we set the value of the field, field.set(o,dynamicInjection(classLoader,binaryName). With that we have now created a dependency injection annotation with the Junit 5 extension model. Now I am sure you can see the tower of exceptions, which is obviously not ideal. I'm not sure how I want to handle all the exceptions yet. However, I will be digging around the Mockito code base to see if I can find how they handle all their exceptions.
-
JVM Testing Newsletter | June 2021
Mockito 3.11.* releases
-
Writing Apache Parquet Files
Hi, I've been trying to write parquet files on android for the past couple of days, and have really been struggling to find a solution. My original hypothesis was to just use the java parquet implementation (https://github.com/apache/parquet-mr), but I've since realized that not all java libraries play well with Android. I've gone through essentially dependency hell trying to franken-fit the library into my project, and imported as much as i could before hitting walls such as this one (https://github.com/mockito/mockito/issues/841).
Guava
-
Lists: do you know the nature of yours? The strange story of a data container in Java
The first problem is at the level of Type System, given that a situation more correct would allow us to distinguish through the Collection Type which abstraction we are operating with, species if definable as mutable or immutable. The JCF was born at a time when great care was taken to offer immediate operational data structures, and with attention to performance, but with less attention to constructs or uses that are now seen as common. These concepts have been taken up by other infrastructures from which we certainly cannot fail to mention: Eclipse Collection, Guava Collections, and VAVR.
-
Google/guava: Google core libraries for Java
Even better is getting Gradle/Maven to correctly pull "plain" vs "Android" versions of the package instead of them just publishing the diverging code base as two repository packages.
-
Guava 32.0 (released today) and the @Beta annotation
I'll admit I'm surprised to see that BOMs have been documented on maven.apache.org since mid-2008. It looks like Spring, for example, didn't adopt them until mid-2014. I don't know how widely they caught on in other areas. The first discussion of them in the context of Guava may have been in 2018, as I don't see mention of them in the various issues from 2011-2015 (#605, #1329, #1471, #1954.
-
Best Practice of Guava ImmutableList
And a quick peek at the source code for ImmutableList seems to confirm this (https://github.com/google/guava/blob/master/guava/src/com/google/common/collect/ImmutableList.java - it goes via a bunch of methods, but ends up using Arrays.copyOf(), which creates a fixed-size array).
-
Genuine question: how do you all use Haskell IRL?
The guava library of Java has some of these data structures implemented: https://github.com/google/guava/wiki/ImmutableCollectionsExplained , but implementations of the above book in many languages can be found on github (say, this one for Haskell: https://github.com/aistrate/Okasaki )
- Murmurhash -criando um rollout progressivo via backend
-
ΠΠ΄ΠΈΠ½ ΠΈΠ· ΠΏΡΠΈΠΌΠ΅ΡΠΎΠ² ΠΏΠΎΡΠ΅ΠΌΡ ChatGPT Π΅ΡΠ΅ ΠΎΡΠ΅Π½Ρ Π΄Π°Π»Π΅ΠΊΠΎ Π΄ΠΎ Π·Π°ΠΌΠ΅Π½Ρ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΡΠΎΠ², ΡΠ° ΠΈ ΠΎΡΡΠ°Π»ΡΠ½ΡΡ
ΠΏΡΠΎΡΠ΅ΡΡΠΈΠΉ ΡΠΎΠΆΠ΅.
Java Mask: Java Mask is a library that offers various string masking techniques for sensitive data such as credit card numbers, email addresses, and more. You can find the library at: https://github.com/miguelfreitas93/java-mask DataMasker: DataMasker is a Java library specifically designed for masking sensitive data, including credit card numbers, using customizable masking patterns. Visit the GitHub repository for more information and usage examples: https://github.com/GDSSecurity/DataMasker Maskify: Maskify is a simple Java library that can be used to mask credit card numbers, Social Security numbers, and other sensitive information. You can find the library at: https://github.com/jonathancarvalhoalves/maskify CreditCardUtils: This is a lightweight Java library that provides utility methods for validating, formatting, and masking credit card numbers. Visit the GitHub repository for more information: https://github.com/malkusch/creditcardutils Google Guava: Google Guava is a popular set of Java libraries containing a wealth of utilities for working with strings, collections, and more. While not specifically designed for masking credit card information, you can use Guava's string manipulation methods to mask sensitive data: https://github.com/google/guava
-
Twitter makes some of its source code public
I mean, I guess, technically? If you define it like that, then Microsoft has people working for them for free, as does Google, as does Apple, etc. It's not that weird, and you can try to twist it to be weird, but those of us in the software industry largely regard this as a good thing.
-
Managing unfixable CVEs
So we have https://github.com/google/guava/issues/4011
-
Java 17 migration: bias locks regression
Ok, so let's implement our lazy initialization more smartly to avoid acquiring the lock every time and use old fashion but still working double-checked locking. I've found it implemented by Suppliers.memoize in guava library.
What are some alternatives?
WireMock - A tool for mocking HTTP services
JGit - JGit project repository (jgit)
REST Assured - Java DSL for easy testing of REST services
javatuples - Typesafe representation of tuples in Java.
MockServer - MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
Caffeine - A high performance caching library for Java
Testcontainers - Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
Eclipse Collections - Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.
Cucumber - Cucumber for the JVM
Hashids.java - Hashids algorithm v1.0.0 implementation in Java
Selenium
Gephi - Gephi - The Open Graph Viz Platform